OSDN Git Service

Badge ChooserActivity choices with their app icon for disambig
authorAdam Powell <adamp@google.com>
Thu, 17 Sep 2015 20:38:16 +0000 (13:38 -0700)
committerAdam Powell <adamp@google.com>
Thu, 17 Sep 2015 20:56:00 +0000 (20:56 +0000)
commit00f4aad704198a8293b9a1d2b931b8708073fe15
treed991d8f457b5362f9cd10529e734e5ade97b2519
parent952d5b334ccdf9cab0f56673861906e59d4e9933
Badge ChooserActivity choices with their app icon for disambig

When two or more activities with the same user-visible label are
shown, we have traditionally shown the app name or package name if the
app names also match. This was to help the user tell the difference
between multiple apps publishing similar activities and avoid
unintentionally starting the wrong one. However, in the case of
explicit choosers (e.g. ACTION_SEND sharing) a few common collisions
occur in practice and falling all the way back to package name isn't
very helpful.

Instead, we now assume that the app icon, which the user has seen
before at install time, is unique enough on its own to disambiguate
these cases and avoid user confusion. We no longer show the app name
or package name as secondary text in the chooser.

In cases where an activity has a different icon from its containing
app, we now badge the activity icon with the app icon so that the user
knows which app a potentially ambiguous choice belongs to.

Bug 24113937

Change-Id: Ie54fbf77bfcc86e50768f93be2be0e53cf2ce7b5
core/java/com/android/internal/app/ChooserActivity.java
core/java/com/android/internal/app/ResolverActivity.java