OSDN Git Service

Handle single-choice ChooserActivities and bound ChooserTargetServices
authorAdam Powell <adamp@google.com>
Wed, 9 Sep 2015 00:01:49 +0000 (17:01 -0700)
committerAdam Powell <adamp@google.com>
Wed, 16 Sep 2015 19:54:24 +0000 (19:54 +0000)
commit39e94ebe22d4959facea4c3621a0a5377242a570
tree312e9e9fe89c32ff28de2d14f5ec75933471e311
parentbfc584df683a84dffd8e04b7b13f619606a0a42a
Handle single-choice ChooserActivities and bound ChooserTargetServices

Fix cases where we could try to unbind from a ChooserTargetService
that is not connected. This could happen if we still had stale replies
coming back after the activity was destroyed.

Always offer users an explicit choice in ChooserActivity, don't
auto-start a single option.

Make sure we don't allow a wedged ChooserTargetService to hold a hard
reference to the ChooserActivity via its internal result callback.

Bug 23152483

Change-Id: I7c8b1fc9559dcd477702ef582011b088b07d646b
(cherry picked from commit 9761ab2a645a4643bd20619c7c148ef07e0dd39d)
core/java/com/android/internal/app/ChooserActivity.java
core/java/com/android/internal/app/ResolverActivity.java