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, 9 Sep 2015 16:50:30 +0000 (16:50 +0000)
commit9761ab2a645a4643bd20619c7c148ef07e0dd39d
treef59490ae4e17785c67b62dc754c6d8c74adb7f97
parentab5bca1519cb9acb4fd140e99a250fc50868ff2f
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
core/java/com/android/internal/app/ChooserActivity.java
core/java/com/android/internal/app/ResolverActivity.java