History log of /frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
db688af9d9a0634d7099726d85ed7ac22d83e3f2 11-May-2017 Sumir Kataria <sumir@google.com> Use placeholderCount-1 if using default layout.

Bug: 37092598
Test: Updated ResolverActivityTest, Manual testing

Change-Id: I57ddd48c24830ac9a31a87013ca1d9b2e5714631
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
51efddbd3bb304de2dd47fa8cd1114ac555958bb 05-Apr-2017 Alan Viverette <alanv@google.com> Remove unnecessary casts on calls to findViewById

Just frameworks/ this time. More paths to come.

Bug: 24137209
Test: make -j32
Change-Id: Iff27abd26fa43296ac2fff8f534fc6742d2ae80c
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
38a6da6473563ce2dcee360cabe1183c2a7c926e 05-Apr-2017 Kang Li <kanlig@google.com> Add a service to rank apps for ResolverActivity.

bug: 36952725,30982298

Test: used PTP before and after this fix.

Change-Id: I5b249af2dd0d9fe32d1e524e8d2675c863e92b5b
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
c88749fb5a8de40572582e6eceefd46cda3afa2d 05-Apr-2017 Kang Li <kanlig@google.com> Revert "Add a service to rank apps for ResolverActivity."

This reverts commit 90370e0b2497deba9382ab7ff1539b6849df8139.

b: 36952725

Change-Id: Ifa8f182c707cdbbc989b1f61630f7a8fa856d32d
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
90370e0b2497deba9382ab7ff1539b6849df8139 14-Mar-2017 Kang Li <kanlig@google.com> Add a service to rank apps for ResolverActivity.

bug: 30982298
Test: manual - shared images in Camera, texts in Messenger, and webpages
in Chrome.

Change-Id: If335c269ca54145839ad8fd4b3f9b93a74b550f8
(cherry picked from commit 35b9e3015565850e9de963e4bda1be227825df5d)
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
f561734e9cad622b04422916e48dd6bf8f38e221 28-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix crash in onRestoreInstanceState"
5dbc819076549714f3ad92249d5a3c25e98f16ee 25-Feb-2017 Hakan Seyalioglu <hseya@google.com> Fix crash in onRestoreInstanceState

bug: 34973084
Test: Manually verified crash stops

Change-Id: Ic28f98bc422d12f0db5c5921e89008eb2da1862d
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
f631ef769ad718f9ce52955d67623fa67a942cd5 24-Feb-2017 Jorim Jaggi <jjaggi@google.com> Fix sharing bugreports from lockscreen

When launching ChooserActivity from lockscreen, we will start it
in stopped state because lockscreen is still showing, meaning that
the activity goes through start -> resume -> pause -> stop
immediately after it was launched, and will be later resumed once
Keyguard actually goes away.

However, ResolverActivity finished itself in onStop. We add a
private extra to change this behavior for sharing bugreports.

Test: Take bugreport, double tap on it on lockscreen
Test: com.android.shell.BugreportReceiverTest$1
Bug: 33009364
Change-Id: I973b2c71587950499b7c88b16af9cf1387795e17
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
873cbfd19a64cb2b556895588b877801772f6213 22-Feb-2017 Hakan Seyalioglu <hseya@google.com> Fix bug in auto launching with one entry.

bug: 35422006
Test: Confirmed linked bug is fixed with manual test.

Change-Id: Ie5d237c2b85f274b26f913dba3dff585c2547a2b
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
b69aaf0b359fce0daf3df87be4a2d4db8a4390c7 16-Feb-2017 Xiaohui Chen <xiaohuic@google.com> Merge "ReolverActivity: try auto launching single choice" into nyc-mr2-dev am: daacf547ac
am: 0a804ff49c

Change-Id: I8f378b98f29aea48773804bb65306c5b6760a758
393c8018a1123f869698269e678876e03a5160ba 14-Feb-2017 Xiaohui Chen <xiaohuic@google.com> ReolverActivity: try auto launching single choice

We already does this on start. Now we also do the same when
the list of options changes.

Test: locally on device
Bug: 34470067
Change-Id: Ib184d67b532c5afd584fb9cd52daac69a7c50d0a
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
13405c552956eee529462eb8004ca3eab4273a8b 01-Feb-2017 Hakan Seyalioglu <hseya@google.com> Fix interaction w/ work profile & last chosen

bug: 34677697
Test: New unit tests added
Change-Id: Ibb5c804c16a758ff041ce7165fda561d903b5f31
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
23f3465f62c905beaa067a80aa2c2669ffbc1abb 03-Feb-2017 Hakan Seyalioglu <hseya@google.com> Use default icons while disambig sheet is loading

bug: 34254941
Test: manual testing and check coretests pass
Change-Id: I8cae7ee98628ef3d69fddd6374bcbf91d8a1873c
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
e3286c3145d54564e783333ac2a2bb89b9ffdc49 30-Jan-2017 Hakan Seyalioglu <hseya@google.com> DO NOT MERGE - Check exported status in chooser

Relevant change in master is ag/1844170

bug: 34147053
Change-Id: Ic9d9d65c66325904c95ab3966bdcc16e7668278b
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
9149dcaf414ebdac231af93d44abd5951a514a7e 17-Jan-2017 Hakan Seyalioglu <hseya@google.com> Add ResolverActivity testing

Still very basic, but will be adding as we find more issues pop up.

Test: Ran the tests
Change-Id: Ib9863509d140ff425ce446ecc876f53494d4fd0e
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
9fa2a2cd46e11be0ea50ad7be0d3dd2c9273f55a 06-Jan-2017 Kang Li <kanlig@google.com> Adds annotations to Intent, and enables ChooserActivity to rank apps
according to annotations.

Test: Unit tests and manul tests. More unit tests to be added.
Change-Id: I3cbfd0cc10007290585fa3e7e3c92e1731f1f7b8
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
64b018e0ebf0408f82a5347ffe695a57dd9f87fa 06-Jan-2017 Kang Li <kanlig@google.com> Adds tests for b/34095835.

Bug: 34095835

Test: reproduced the bug in b/34095835 to ensure that it is covered by
the test. Manually ran the tests.

Change-Id: I28a887341906dc443e1a854ddba51cd1b4daeead
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
33550129e5d86e3ba81d8c9ba67dd9a8dc6a68c1 07-Jan-2017 Hakan Seyalioglu <hseya@google.com> Fix some issues with the last used entry

Delay a few operations until after the async phase which rely on display
info being retrieved for resolve targets until after they are available.

Also fix a smaller bug where the list header may be appended multiple
times on activity recreation. Wanted to submit this while writing unit
tests still in progress since there's an open P1 on this for dogfood.

bug: 34103288, 34128854, 34127768
Test: Manual testing - writing unit tests in progress.
Change-Id: I47f747a7493f47863a0107cd8054901bab494462
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
0cef910d5e159800bacb69310a69ba04eafcd30c 05-Jan-2017 Kang Li <kanlig@google.com> Fix crash when updating ranking model in ChooserActivity.

Bug: 34095835

Test: manual tests (automated tests will be added later): 1. take a
picture and share it to Photos; 2. take a bug report and share it to
Gmail; 3. launch Chrome app, share a webpage to Drive; and 4. launch Contacts
and share a contact to Messenger.

Change-Id: Ie50c8305f90b6df69aa1e47c01d0b2212da0a37a
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
97a8d7038646c34b25619d2e2ae9d6c7c8104f35 04-Jan-2017 Kang Li <kanlig@google.com> Merge "Rank apps by Logistic Regression for Smart-Sharing."
e1276bfe086a40a0fba7e81dd5db13f95287714d 08-Dec-2016 Hakan Seyalioglu <hseya@google.com> Do the sorting for the ShareSheet asynchronously.

This lets the screen fade out and share sheet start being displayed
before all results are sorted. Based heavily on ag/1126533. There are
two other follow ups that I'd like to do after this that aren't a part
of this change:

1) Investigating images being loaded multiple times (from original
change)
2) Put placeholder space while the sorted images are coming in - at the
moment there's some jank when the list of applications becomes
visible.

Test: Unit tests for ChooserActivityTest (still would like to add tests
for ResolveInfoController and UsbResolverActivity).

Change-Id: I4c4a65fff1b0f17fc52b9bd01c3d5c59d649d119
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
a2c7774d218a5c42ea9154a3df122d5275589911 20-Dec-2016 Kang Li <kanlig@google.com> Rank apps by Logistic Regression for Smart-Sharing.

Bug: 30982298
Test: manual - tested by sharing images in Photos and sharing texts in
Chrome.

Change-Id: I9808abdefbc898d3452e684f3462efafdfd53c23
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
53b4314ad9b43b1890cbd765b896ccb0f005fdeb 14-Nov-2016 Kang Li <kanlig@google.com> Add Sharing Histories to UsageStatsManager.

This CL is for Android O Smart-Sharing (b/30982298). By this CL, sharing
counts are logged with UsageStatsManager.

Bug: 30982298
Test: manual - shared images in Camera and texts in Chrome using a mobile device.

Change-Id: I0b4aa0506f99b3083d140a48f7b4bdd5b1c5afb6
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
dc589ac82b5fe2063f4cfd94c8ae26d43d5420a0 11-Nov-2016 Sudheer Shanka <sudheersai@google.com> Update usage of ActivityManagerNative.

- Remove references to ActivityManagerProxy.
- Add isSystemReady to ActivityManager.

Bug: 30977067
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test android.server.cts
adb shell am instrument -e class com.android.server.am.ActivityManagerTest,com.android.server.am.TaskStackChangedListenerTest \
-w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I07390b6124fb1515821f5c0b37baf6ae74adc8fa
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
383db5ebcc3a4a615faf249bf4f126f42e80b82e 22-Jun-2016 Tamas Berghammer <tberghammer@google.com> Update package names to work with the proto3 compiler

Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
00e587086bce3587a1994716a8577c7da45f65df 09-Sep-2016 Adam Powell <adamp@google.com> Fix duplicate entries in ChooserActivity

Fix use of wrong index when checking for duplicates.

Bug 31234526

Change-Id: Ia37d1b04a9054b8d90957057db857633e4b79569
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
9550f5dfa607b1c464c2673186ee26e4b12a79d6 11-May-2016 Clara Bayarri <clarabayarri@google.com> Fix crash in ResolverActivity

Bug: 28540294
Change-Id: Ib20b1c401e2c28226d9133bb8787f09f09169885
(cherry picked from commit b53b2bd088f122e5bd1e3d493178100d15d8cb7a)
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
fa902aaa616fefe673c25cdd7604c95e0b27669b 13-Apr-2016 Clara Bayarri <clarabayarri@google.com> Add Tron logging for open/close App Disambig

This change adds
- Open/close the disambig shade with a featured app
- Open/close the disambig shade with no featured app
- User selected "Always" for the featured app
- User selected "Just Once" for the featured app
- User chose a non-featured app

Bug: 26108706
Change-Id: I4d2c99cee1a784aa1cab156939c57c83d35a4aa5
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
3277cf1ea4f89d073f60b665ed48a5639de99ef2 17-Jul-2014 Henrik Engström <henrik.engstrom@sonymobile.com> Make ResolverActivity respect selector intent when making filters

When the ResolverActivity makes a filter after an intent is chosen,
either for remembering last used or an "always use" choice for the
user it doesn't consider the selector in the intent if present.

This means that when a resolver activity is launched for an intent
with a selector, the selector is used for resolving preferred
activities, and for populating the list, but when the same intent
is sent again it doesn't match the filter created by the previous
ResolverActivity.

This in turn means that the user will get another ResolverActivity
even if "Always Use" was chosen the last time.

Bug: 28129216

Change-Id: I29be7010e7c890caf9789673b3c3f821ba362761
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
f8173ca8ac0efef39c79d732fd9eee80d1066302 13-Apr-2016 Philip P. Moltmann <moltmann@google.com> Set label for links to resolver activities.

Also: Add specific labels for capture-image-intent.

Fixes: 20134921
Change-Id: I3678def1089512a8340f19110645a03379c26cee
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
66e495e647c10955e4df09c13b6f7dc85c0e58be 06-Aug-2015 Yuichi Biwa <yuichi.xa.biwa@sonymobile.com> Fix: ResolverActivity sometimes cannot update the last chosen activity

Symptom:
Calling startActivity() with an implicit intent,
ResolverActivity displays preferred activity candidates.
At first user selects one of them as "JUST ONCE".
And next, the last one is shown again on the top with "JUST ONCE" and
"ALWAYS".

But even if user selects another ones except top with "JUST ONCE".
Next time, the last one is not shown on the top.
Instead of that, first one still remain on the top.

It means that user can't select activities as "ALWAYS"
except first one.

Root cause:
The implicit intent has a URI but not MIME type.
In this case, Intent#resolveTypeIfNeeded returns "null".
So MIME type is not passed to PackageManagerService.
That's why this issue happens.

Change-Id: I87b6da9c5d8b47e071bbedf9f7d5f3ecea730875
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
52c39215db2a0e1d339733e06284a2ba81e4c794 08-Apr-2016 Adam Powell <adamp@google.com> Chooser filtering and caller direct share targets

Let apps invoking the system chooser specify components to filter out
such as themselves; this will prevent duplicate nonsensical UX where
it doesn't make sense for an app to share to itself.

Similarly, let apps provide their own Direct Share targets for when
they do want to let users share via their own internal services in the
same UI. These options can be used together.

Also fix a bug where a lingering binder reference from a remote
ChooserTargetService that hasn't been GC'd in the remote process could
keep an active reference to a ChooserActivity instance.

Bug 28073484

Change-Id: Ib613b1153b49dfedf79574b1af7c45379eceec24
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
958f00f396e1e7bf2edc4aa4e27fe11fa533b44a 02-Apr-2016 Jorim Jaggi <jjaggi@google.com> Do not clear INSCREEN and INSET_DECOR for resolver

Since we switched this activity to draw the system bar backgrounds,
and clearing these flags leads to that we don't get the insets
communicated, we need to remove the clearing of the flags.

Bug: 27914346
Change-Id: I72114ac7cec40933fa45891b3d1441bd30f883d4
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
82b1a68ed488b5d787c4eee2bc0052b4a76d7ae1 29-Mar-2016 Nicolas Prévot <nprevot@google.com> Merge "Update cross-profile intent resolver." into nyc-dev
256423f10b4fd85a4233146ceb4e063db806b500 09-Feb-2016 Nicolas Prevot <nprevot@google.com> Update cross-profile intent resolver.

Move the profile button one line above.
Change "Work" to "Switch to Work"
Change "Personal" to "Switch to Personal"

BUG:25609998
Change-Id: I002c8e3cc1537b1b9b8b52b79ba639ab5b8e5f88
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
b2303ddd0516881342067114d141bb8493997776 21-Mar-2016 Wale Ogunwale <ogunwale@google.com> Merge "Don't finish resolver activity onStop if it is for home intent" into nyc-dev
9014e66db07799398b06cd5b9a5fef67d42fd2d5 19-Mar-2016 Wale Ogunwale <ogunwale@google.com> Don't finish resolver activity onStop if it is for home intent

Helps avoid a continuous launch cycle if a resolver activity resolving
the home intent is the only activity in the system and the lock screen
is up which will put the activity in the stopped state. The activity
then finished itself onStop, but is then relaunched by the activity
manager since there are no other activities in the system and the
home activity should be present.

Bug: 27674536
Change-Id: Iaca67a00c4a37f70aafd18aedcbd8dba2f561203
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
13ea8f48ab32d45c70e6b945511bf4324cd37b15 18-Mar-2016 Adam Powell <adamp@google.com> New string for resolving ACTION_SENDTO intents

"Share" didn't make much sense here since SENDTO is used for sending
content to a specific recipient, e.g. emailing a person from their
Contacts page in the dialer.

Bug 23626568

Change-Id: I8ac4f2aee5c41aa6c2d546b39283c6f22127cefe
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
2b9eb89aedf42717bede1d5c6fc3c854a9536fdb 16-Feb-2016 Jeff Sharkey <jsharkey@android.com> Disable StrictMode when starting activity.

Since intents can come in from older apps, don't let them crash us
by including file:// Uris. This narrows the relaxation to only apply
when starting the requested intent.

Bug: 27070755
Change-Id: Ifcf9068424e072f52758c8feeab5fbf23d678a2e
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
37355a9f5d1e82c6d3eb3d6c919462373457af4c 06-Feb-2016 Jeff Sharkey <jsharkey@android.com> Tweaks to file:// Uri StrictMode checks.

Whitelist two more legacy intent actions, and don't enforce the
StrictMode checks when resolving intents that might be coming from
legacy apps. Newer apps would have already been yelled at directly
before getting to the resolver.

Bug: 26976516, 26977622
Change-Id: Ibf72a361ed68c52cfaac16c32ab40e79005a42e7
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
2388251fcd8def03a6bbc91382e84db085cf4253 29-Jan-2016 Adam Powell <adamp@google.com> Pinning components in ChooserActivity, take 2

Keep the ChooserActivity in the android:ui process/system.

Change-Id: Ia3ae29a8d629f41a53a066b9fc7ed0b28666b261
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
e7c74cc96eeecec52401d9bf720234d1421cfebc 28-Jan-2016 Adam Powell <adamp@google.com> Revert "Pinning components in ChooserActivity"

This reverts commit ec6bc41e1835804533fd21b3ef8047ecd893bcfd.

Bug 26842512

Change-Id: I9fc775d21081885d0e26fca4ade412a18da45b7c
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
64382cb7b48da437a1dce48a55c4dc02f259d340 28-Jan-2016 Nicolas Prévot <nprevot@google.com> Merge "Don't show suspended applications in system intent picker dialog."
ec6bc41e1835804533fd21b3ef8047ecd893bcfd 27-Jan-2016 Adam Powell <adamp@google.com> Pinning components in ChooserActivity

Move ChooserActivity to SystemUI. This is a safer place for it to live
and still be able to persist data to storage.

Add a context menu to long press for chooser targets allowing users to
'pin' a target component from an app. This causes it to sort to the
front of the list so that a user's favorite apps are always available
from share UIs, etc. Similarly, all ChooserTargets from a pinned
component receive an impossibly large boost for sorting so that they
will always appear first.

Bug 26791843

Change-Id: Ib4e603d9d4263403e98ce619287452ddab593044
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
697397a28ef0de8856f86a0765ffc6dc9b20d130 11-Jan-2016 Nicolas Prevot <nprevot@google.com> Don't show suspended applications in system intent picker dialog.

BUG:26461656
Change-Id: I49cf501cb9992ee19091ab4909adb373cbb4bdce
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
e06b4d1d9f718b9fe02980fea794a36831a16db2 06-Jan-2016 Jeff Sharkey <jsharkey@android.com> Consistent naming for PackageManager methods.

When hidden PackageManager methods take a userId argument, they
should be named explicitly with the "AsUser" suffix. This fixes
several lagging examples so that we can pave the way to safely
start passing flags to new methods without scary overloading.

Also fix spacing issues in various logging statements.

Change-Id: I1e42f7f66427410275df713bea04f6e0445fba28
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
63b31698452dbc36f6258c980d7a731518bfd6a0 28-Sep-2015 Adam Powell <adamp@google.com> Add animation and positional stability to intent chooser UI

Dejank the process of bringing in new ChooserTargets from queried
services. Animate the service target rows in upward so that if the
user's finger is already headed for a visible choice we don't inject
something wrong right under them at the last second. Keep things sane
if the user is dragging the UI while we're bringing in new items.

To animate this, since we can't use RecyclerView from the framework we
treat the height of rows as a conceptual data set change for
ListView. To get away with doing this per-frame we pre-measure the
item height (which remains constant) instead of doing more expensive
wrap_content calculations. ResolverDrawerLayout is now aware of how to
account for a cheat-measured ListView to compensate.

Bug 24038066

Change-Id: I01414a5746815255ff948a6d0887bb5ad0897285
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
cc2ae6b421353e03160df3b05ce9042b8a5ff8cc 29-Sep-2015 Jeff Sharkey <jsharkey@android.com> Relax auto-launch checks for GET_CONTENT.

When a developer wraps an intent with Intent.createChooser(), they're
indicating that the user should always be prompted, instead of using
any "always use" defaults. A recent CL changed the chooser behavior
to ensure that UI is always shown in the case where there is only one
match.

However, this caused us to start prompting for the GET_CONTENT intent,
for which there is only ever one DocumentsUI system app. Since that
app delivers on the createChooser() contract described above, we're
okay automatically launching it.

Bug: 24464358
Change-Id: I0279d3343479c134a35f41ddf3cb4204d0ae6a90
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
00f4aad704198a8293b9a1d2b931b8708073fe15 17-Sep-2015 Adam Powell <adamp@google.com> 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
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
39e94ebe22d4959facea4c3621a0a5377242a570 09-Sep-2015 Adam Powell <adamp@google.com> 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)
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
ce5d92c31370b8c0e6989506e1ee95e181f93c53 31-Jul-2015 Alan Viverette <alanv@google.com> Add badge content description to TargetInfo, use in ResolverActivity

Bug: 22667344
Change-Id: Iee241b9179c74a15b1c635cf90d2f96f6f7b31cd
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
57dd737443a174379eb638450e4888500d8e4a23 28-Jul-2015 Dianne Hackborn <hackbod@google.com> Work on issue #21516866: Implement voice interaction in ResolverActivity

The main change here is to not allow the dialog to go in to its "focus
on the last app the user selected" when running in voice interaction mode,
instead just always giving a simple list.

This also fixes some problems with cleaning up active commands when
an activity finishes and not forcing the current session to go away
when the screen is turned off.

Also added some debug help, having activity print the state of the
voice interactor.

Change-Id: Ifebee9c74d78398a730a280bb4970f47789dadf5
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
f38c4ee9030b68c2f2b00d376c7d4a05a58a818a 17-Jul-2015 Dianne Hackborn <hackbod@google.com> Work on issue #22556778: Starting under voice control not allowed

The ResolverActivity is voice capable. In fact, it is capable
of EVERYTHING.

Change-Id: I37c4476d546f61fee3540b747aff77e88b702d48
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
a7cfbe0e548ac76f20915b65851b8bc9095aa541 16-Jul-2015 Dianne Hackborn <hackbod@google.com> Work on issue #22516282: ChooserTarget URI grants not forwarded

Add new option to startActivityAsCaller() which allows you to
specify that we should not do security checks on the target
activity being launched.

Change-Id: Ie6b28807b96fef35ccdff93b0a01066cfd8fa307
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
a182e45c6851a8db89e8b0900f0812806ff295d4 07-Jul-2015 Adam Powell <adamp@google.com> Sort and limit ChooserActivity targets from ChooserTargetServices

Apply an automated decay factor if apps decide to claim all of their
targets are SUPER IMPORTANT. Apply the multiplier from the apps
themselves as well as a penalty for apps that come in late - let's see
how fast developers get their ChooserTargetServices to start!

Also fix a bug with ResolverDrawerLayout where dragging from the title
area wouldn't always work properly.

Bug 22302285

Change-Id: Ib6eb2b6fb92608790b2267c0f671c9ae59b2907e
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
c412be6824900d5e9d6f44fa9aa3015f0d5b517b 24-Jun-2015 Adam Powell <adamp@google.com> Fix ChooserActivity check for still-alive ChooserTargets

Only prune ChooserTargets if the resolved activity source they came
from is still present after refreshing the list. Compare this directly
against the ComponentName rather than ResolveInfo.equals, as the
latter isn't implemented.

Bug 21953672

Change-Id: I6486bda85c19d7371167affe2a2b80a2668bd734
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
4c470d641c6906a742b63273b305695ba575b3e1 20-Jun-2015 Adam Powell <adamp@google.com> Add voice interaction support to ResolverActivity/ChooserActivity

All options are sent to the VoiceInteractor once ChooserTargetServices
have reported in. We don't perform explicit progressive refinement or
filtering, but an explicit option picked will be invoked.

Also fix a lingering bug around being able to nested-fling the
resolver drawer closed.

Bug 21516866

Change-Id: I6b141f5fa87d74dccec9dcb88110630696e9c38e
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
a408061cc7b5efaf090ce9efd5fd0ba1d95e9c11 19-Jun-2015 Sudheer Shanka <sudheersai@google.com> Merge "Use the intent filter icon in ResolveInfo for managed profile." into mnc-dev
d25267c0d81e84a064faf281a61c64eec3facf68 06-Jun-2015 Adam Powell <adamp@google.com> Start using some better sorting for intent resolution

Previously we used time in foreground as our sole signal. Now, also
use time since last launch and launch count as signals.

Still to come later: launch count based on specific component name
rather than package, pending the recording of that information in
usage stats.

Change-Id: Ic449cae396cfee797b7bb3de9dc3c0da5da2f96c
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
9ded760f6378b79ae5f91fe694744981a4154d0b 19-May-2015 Sudheer Shanka <sudheersai@google.com> Use the intent filter icon in ResolveInfo for managed profile.

Bug: 20753645
Change-Id: Ifed4b498524272517c9f3338ba88fcbcd3b22075
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
5007735782ef5b48a5a8b6d317aff693ffad2db9 27-May-2015 Adam Powell <adamp@google.com> Fix one-action choosers with EXTRA_INITIAL_INTENTS

Fix a bug where initial intents weren't respected as valid options
when there is only one choice available.

Bug 21304304

Change-Id: I304ee6acf20a367da6296132f85d913ad9fce127
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
e2f43948d1de58e49192b97306e8a4e1c99412f4 12-May-2015 Fabrice Di Meglio <fdimeglio@google.com> Merge "Add user selectable Default Browser feature - part 6" into mnc-dev
3453e081e0a94bbb0b8c1d58ce4ccdbf2e53639e 12-May-2015 Fabrice Di Meglio <fdimeglio@google.com> Add user selectable Default Browser feature - part 6

- if a default Browser is not defined and if a Browser App
is selected into the disambiguation dialog, then make it as
the default Browser
- clear default Browser saved data (package name) when
the default Browser App is removed

See bug #20144393

Change-Id: Ia8621d7a61ec2cb60deded9d70f75f1e1d88d123
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
7d7580019e44e2e162df01ffff51de20ed0721b3 07-May-2015 Adam Powell <adamp@google.com> Bringing new Chooser UI closer to spec

Separate the chooser targets into rows by type. Remove some API that
was redundant with LabeledIntent, simplifying ChooserTarget.

Change-Id: I90de471825f05d85e6ffbe72a32fb597be824a30
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
2ed547e55f820a9c705872d802b051d8ae9c906b 30-Apr-2015 Adam Powell <adamp@google.com> Add alternate intents and refinement callbacks to ChooserActivity

Allow a calling app to supply an array of additional Intents to the
system ChooserActivity.

The chooser will present a merged list of targets that can handle any
of the Intents supplied, including both the standard EXTRA_INTENT as
well as any of the intents supplied in EXTRA_ALTERNATE_INTENTS. These are
treated as ordered; EXTRA_INTENT is considered the first/primary
Intent and EXTRA_ALTERNATE_INTENTS are sorted most important first.

Targets are queried for all supplied Intents. If the same component is
returned for more than one Intent, the target is associated with the
most important Intent that matched.

This allows calling apps to supply several different payloads for an
action depending on what the intended targets are able to support. For
example, an app performing ACTION_SEND may supply image/jpeg data to
compatible targets or a hosted web link to targets that only support
text/plain. The user will have the opportunity to pick from a single
merged list of choices using the best available payload, and will not
be bothered with the implementation details of how the payload will be
delivered to the recipient.

If the calling app wishes to provide further disambiguation or
refinement after the user makes a choice, for example to let the user
choose which of the source intents to send from the primary or
alternates, show a progress dialog as a full-resolution version of a
photo is downloaded from the server before being sent along or while
reticulating splines, the caller can supply an IntentSender to
ACTION_CHOOSER including the extra EXTRA_REFINEMENT_INTENT_SENDER.
This should be the IntentSender obtained from a PendingIntent pointing
at an activity to launch to perform the refinement.

The refinement activity should report that it is finished by obtaining
the ResultReceiver from EXTRA_RESULT_RECEIVER. Available intents to
send to the selected target will be contained in EXTRA_INTENT and
EXTRA_ALTERNATE_INTENTS.

To complete the refinement and send the result along to the chosen
target, the refinement activity should select one of the supplied
intents and send it to the ResultReceiver in a Bundle with the key
EXTRA_INTENT and the result code RESULT_OK. To cancel the refinement,
and let the user select another choice, send RESULT_CANCEL.

While refinement activities cannot modify the filterEquals-affecting
fields of the Intent they return, they may modify extras to provide
additional or altered details to the final recipient. These extras
will be filled into the Intent sent to the final target.

Change-Id: I7ad4739eadd1a0e307675847ccf47ea948918a3a
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
0ccc0e9348e42fd8094bb12324f7c5bb6ca018ad 24-Apr-2015 Adam Powell <adamp@google.com> Wire up caller chooser targets for ChooserActivity

Add the caller-supplied ChooserTargets from EXTRA_CHOOSER_TARGETS in
the default ChooserActivity. These appear before other options.

Change-Id: Ic4d23ae9ecdfd0cc8a5ac077696d7334a8f844a6
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
c6d5e3a406c0e80638304980bac13abaa703a9a0 23-Apr-2015 Adam Powell <adamp@google.com> Fixes for ChooserTargetActivity

* Always ensure intent filter is supplied to a ChooserTargetService.
* Add and clarify docs for ChooserTarget constructors.
* Fix a bug where ChooserTargets were being parceled incorrectly.

Change-Id: I32b70c424b0e6bb317e2eeb810566a30c21b9d53
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
2442841819f9554f9b5c8b9c147a51b04e50de4d 02-Apr-2015 Adam Powell <adamp@google.com> Implement ChooserTargetService querying for ChooserActivity

First cut at querying services provided by apps that offer
ChooserTargetServices. This first implementation provides no ranking.

Bind to a limit of 5 ChooserTargetServices and offer the
ChooserTargets they provide as options in the system
ChooserActivity. The chooser now presents targets as a grid and
displays the activity icon from the referrer activity.

Change-Id: I45db829f184fc78d4f18d42b2a60b25bc301eba8
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
1c1b47125da018b44240739db75f8898e064a948 20-Nov-2014 Fabrice Di Meglio <fdimeglio@google.com> Add IntentFilter auto verification

The purpose of this feature is to prompt the Disambiguation dialog
to Users as less as possible.

- add the new "autoVerify" property to the IntentFilter class
- add new APIs to PackageManager:
verifyIntentFilter(int, int, List<String>),
getIntentVerificationStatus(String, int),
updateIntentVerificationStatus(String, int, int),
getIntentFilterVerifications(String)
for supporting IntentFilter verification
- add support for multi-user
- update PackageManager for IntentFilter verification:
basically when we are installing a new package, ask for verification
of all domains from the IntentFilters that have the "autoVerify" to true.
This means that the PackageManager will send a well defined protected
broadcast (with a new INTENT_FILTER_NEEDS_VERIFICATION action) to
an IntentFilter verifier to do the real job of verification.
We are passing in the broadcast Intent all the necessary data for
doing the verification. The PackageManager will receive as response
the result code of the domain verifications and, if needed, the list
of domains that have failed the verification.
- add a new INTENT_FILTER_VERIFICATION_AGENT permission that needs to
be set by an intent filter verifier to be considered as a trustable
party by the PackageManager.
- add also a new BIND_INTENT_FILTER_VERIFIER permission for securing
the binding between the PackageManager and a service doing the
intent filter verifications.
- add ResolveInfo filterNeedsVerification which is a boolean
to knows if the IntentFilter is of a type that needs a verification
(action VIEW, category BROWABLE, HTTP/HTTPS data URI)
- add new "domain-preferred-apps" / "d" dump command for listing the
prefered Apps for all domains
- add new "intent-filter-verifiers" / "ivf" command for listing the
IntentFilterVerifier used
- introduce the IntentVerificationService which is a basic service
for verifying IntentFilters. This service will send HTTPS requests
to the domain declared in the IntentFilter(s) for doing the
verification. This service has a low priority level so that it
can be replaced by a more sophisticated one if needed. This service
is updating the PackageManager intent verification states thru
the updateIntentVerificationStatus(...) API.
- update MockPackageManager

Change-Id: I0bfed193d0bf1f7c7ac79f6c1b160b7ab93b5fb5
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
053d3ddd400a13838c132129a03e56dae0db93d8 09-Mar-2015 Sander Alewijnse <salewijnse@google.com> Do not show toast when forwarding from resolver activity to itself.

Bug:19540802
Change-Id: I99409aab42bdbf187c07a345ca5c404e88a4c918
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
86d35ba5d5925e5ba072a7fbc204a16be419bd5c 04-Feb-2015 Sander Alewijnse <salewijnse@google.com> Move the check for launcher managed profile support.

Bug:19260244
Change-Id: I13ecdc5470cb4546754b245c09adbde4f22bbacd
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
7e64e109cdf9dbd986e80954c2945ae0818a2303 23-Jan-2015 Sudheer Shanka <sudheersai@google.com> Clear leftover state between resolving calls.

Because mOtherProfile variable was not cleared, we were directing
the user to the work intent resolved in the previous call, as well
as showing an extra item in the list.

Bug: 19070842
Change-Id: I48107c4914e7662d862ba4fe83368d65fc0c7966
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
daf92066db6b3934e71277b0290b7149740198de 21-Jan-2015 Nicolas Prevot <nprevot@google.com> Never set "Work" or "Personal apps" as prefered activities.

In ResolverActivity: when the user chooses work or personal:
Do not set them as prefered activities.

BUG:19091836

Change-Id: Ibe0081eb16e58cc25decb3f25b7fd50b5403d5fc
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
b8a2df10c938f1120f5c4a3c0d06aae4ed3f2281 12-Dec-2014 Kenny Guy <kennyguy@google.com> Don't show last used and profile button at same time.

UI for ResolverActivity doesn't support last used
activity and work/personal profile button at the
same time. So if work/personal button is present
disable last used.

Bug: 18730438
Change-Id: I7ae7319bbdeb9bcaab9d6d03f97dea17d07c6d7f
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
6de72663fa7cba3aeac3968b9f892335c93a9457 11-Dec-2014 Esteban Talavera <etalavera@google.com> Take into account other profiles when deciding whether to show ResolverActivity

Show ResolverActivity even if there is only one target
on the current profile that listens to that intent,
if other profiles can also handle it.
Also, fix crash while trying to access out of bounds
element on the list.

BUG: 18701336,18713763
Change-Id: I3a5e9cc5c0eedb2792b8f6d8a5d4aa8ee9e1256b
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
88831a2a6f4c7dd47d6479ba107ce1a8045d3fa5 21-Nov-2014 Adam Powell <adamp@google.com> Make work profile apps easier to pick in ResolverActivity

Pull the "Work" profile item up out of the main list and into the
header of the resolver drawer, making it easier to discover and access
without disrupting the sort order of the list.

Bug 17935301

Change-Id: Id2d081b61828352c998e517127132f883a20b7ef
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
ec452d9ff590725f57bc474b79f4c2731035372d 12-Nov-2014 Dianne Hackborn <hackbod@google.com> Put native apps above browser in resolver activity.

Add a special case for situations where we have some activities
that are matching a URI host/path, so that these are ordered
above others. This only happens when dealing with http or https
intents, for ordering native apps above the browser.

Change-Id: I21f3361229bc7a1ebefda66373d31b6b1fd19973
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
8da8ab5cf2a7faae5691d1e7cd84dfacc7e8cf33 04-Nov-2014 Nicolas Prevot <nprevot@google.com> Merge "An intent forwarded from a chooser intent will be a chooser too." into lmp-mr1-dev
47ffc60578caf0caaf703293a3e96883f6ea5db2 04-Nov-2014 Sander Alewijnse <salewijnse@google.com> Merge "Show message when intent is forwarded across profiles." into lmp-mr1-dev
0e2b73f6858479ca963bd53c49f8955d98f14869 27-Oct-2014 Nicolas Prevot <nprevot@google.com> An intent forwarded from a chooser intent will be a chooser too.

If a chooser intent is fired:
If the user picks "work" or "personal apps":
send a chooser intent to the other profile instead of sending a normal intent.

Also using a userId instead of a userHandle for the target user.

BUG:16514027

Change-Id: I2e45cd57ad72e9b7280e772b31fc10938642ba59
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
f654533f2d22ede2103ebdb2119a924399234d59 31-Oct-2014 Sander Alewijnse <salewijnse@google.com> Show message when intent is forwarded across profiles.

In resolver activity. Solution uses the contentUserHint.

Bug:17199630
Change-Id: I208e55a2bb37c7cd147240986c7659fc66f3e228
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
5dd072d88459ef434ab756e1adcdcd1ce5eb1beb 31-Oct-2014 Adam Powell <adamp@google.com> Allow swipe down to dismiss for ResolverDrawerLayout

Let the user swipe the intent resolver UI off of the screen to get rid
of it. So satisfying!

Also fix a bug where transitioning between touching the area outside
of the drawer to the drawer itself would misbehave or otherwise
dismiss when it shouldn't.

Bug 18026675

Change-Id: I456cc22b9575dc4c65e45154dc81201fe2045adc
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
0b3c11260ae5ea09c7e702802b39f77afc74f35f 09-Oct-2014 Adam Powell <adamp@google.com> Intent chooser callback

Let an app specify an IntentSender as an extra for ACTION_CHOOSER that
will be notified of the user's chosen target. Apps can use this to
implement things like one-touch last used affordances without
implementing their own one-off chooser UI.

Bug 17363684

Change-Id: Ic5d1d0e0c7a0bae3eda6b1d6ade993f3ba865cfa
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
27c3ab630afd6296ff1ff7b2b71638caa8f2ec54 15-Oct-2014 Adrian Roos <roosa@google.com> Prevent ChooserActivity from taking over the system bars

Bug: 17939334
Change-Id: I4d028695a1f81442cbbe7067b33475634effd5d2
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
4d526bd249d720ef8dc54b8c7ecef9953e5be5c7 15-Oct-2014 Jeff Sharkey <jsharkey@android.com> am cf2c5649: am 97978808: Start cross profile intents as caller.

* commit 'cf2c564987965be1241fe197106b3ec22b11b4b0':
Start cross profile intents as caller.
9797880808320e3a7bae1f59bc7e0c5a13189e5f 14-Oct-2014 Jeff Sharkey <jsharkey@android.com> Start cross profile intents as caller.

The system should always be using new startActivityAsCaller() when
starting activities on behalf of someone else, to ensure that
security checks are enforced as the original caller.

Bug: 17983737
Change-Id: Ic40816a797cfdb13c0adb48b86ed4ed7d6aae8eb
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
1a815921694ca2b3ad4dbb85bf82d85e831bc84e 10-Oct-2014 Nicolas Prevot <nprevot@google.com> Not using resource ids for EXTRA_INITIAL_INTENTS inside a managed profile.

Inside ResolverActivity: when getting the ResolveInfo for EXTRA_INITIAL_INTENTS:
The ResolveInfo is created directly inside ResolverActivity, not by PackageManagerService.
So, noResourceId had not been set to true for this ResolveInfo.
So setting it inside ResolverActivity.

This is needed since inside a managed profile, the icons are not associated with resource ids.

BUG:17577733
Change-Id: Ic4f0439128f95482167103b783344e2baa0aed52
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
955d8d69ea6caabce1461dc25b339b9bf9dc61a6 08-Oct-2014 Dianne Hackborn <hackbod@google.com> Put in real "code" (aka marketing) name.

Change-Id: Idb3976edfae37293ed75cb5b869b4b42d8042bbe
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
a35c77aea61cd0701a921d245ce15bfbd923f117 26-Sep-2014 Adam Powell <adamp@google.com> Always show the name of the last used Home app in ResolverActivity

Bug 17629220

Change-Id: Ia1d0a188f8c0911e5b74b18ba44508a6e2139d0c
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
38ea779b429d4292bdda9349cbf78aa2f0e0fc18 15-Sep-2014 Sander Alewijnse <salewijnse@google.com> Update targetSdkVersion check.

Bug:16509819
Change-Id: I471c4a5b2450b4cc64414dfa2dae75d51cce3abb
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
fd1e93d128da9dbb2f97630c01239bb56199686e 08-Sep-2014 Adam Powell <adamp@google.com> New new design for ResolverActivity

Switch back to using a list as the grid and differently positioned
activity icons were confusing to users. Keep the distinct "last used"
presentation but align icons and titles with the further choices
below. Adjust this to make the fold more apparent. Remember
open/closed slider state across config changes.

Fix some bugs in nested scrolling and flinging.

Bug 17301272

Change-Id: I175937d5821df27b6ac7ffad7f01cd9a6ed3e3e3
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
cc562a811da508b275254f275d6e0c1758a47d07 27-Aug-2014 Adam Lesinski <adamlesinski@google.com> Make UsageStats API comply with API Council

- Fix documentation to mention units of time in APIs.
- Return a Map instead of an ArrayMap

Bug:17289531
Change-Id: I0a2cfdc0bc003eeeb65a16e37bb7b991624b2853
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
11f59a08994d24991980887501e3c04f21a93325 20-Aug-2014 Adam Powell <adamp@google.com> Correctly populate title for ResolverActivity

This affects accessibility feedback.

Bug 17147141

Change-Id: I3e90b80c2813e79e0abe1c5ddc6e0c115a6369dd
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
028ceeb472801bcfa5844fc89ed0da8463098824 18-Aug-2014 Dianne Hackborn <hackbod@google.com> Fix issue #14617210: Apps can gain access to any ContentProvider...

...with grantUriPermissions (no user interaction required)

Add a new path in to the activity manager to start an activity as
if it was directy started by the original calling activity. This
is specifically for the resolver activity and chooser activity to
be able to safely launch its data after serving as an intermediary.

Access to the new method is highly restricted -- it can only be
called by an activity that is declared in the framework apk itself,
and the execute-as-the-caller behavior will only happen if the
code is running under the system uid. (This means we could still
have these run in the client's process in some cases and still work
correctly.)

Note there is some commented out code here half-done about trying
to propagate security exceptions back to the original calling
activity. This would be really nice, especially now with the
chooser activity running in a system process so any errors made
by the app (bad permission grants, bad intents, etc) no longer
actually appear in the app so are essentially invisible. I'd
really like to figure out a way to propagate these exceptions back
to the app, but this is hard since the app's process may no
longer even be running at this point.

Also tweak activity manager dump output to split the recents
dump out from activities, since recents can now be super large.

Change-Id: I50410c4783faf9302c69290589a068a846e0973a
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
81f6d857c1baef5e159bb34dad540baf77572782 09-Aug-2014 Adam Lesinski <adamlesinski@google.com> Merge "Second iteration of the UsageStats API" into lmp-dev
3516800b611a79339a3c188332d13a26e9086b09 22-Jul-2014 Adam Lesinski <adamlesinski@google.com> Second iteration of the UsageStats API

Based on feedback from API council, updated the API.
Also added support for querying the event log.

Change-Id: Ibaa008b9e5bd145acdfe8e20c25c2ed2d96be123
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
1c8eb5e3d03ab492ae5cc69f1d179e9dc244930d 05-Aug-2014 Craig Mautner <cmautner@google.com> Use actual number of packages rather than getCount()

The ResolverActivity method getCount() returns the number of
entries below the default entry, not the total number of entries.
But the onCreate() method expected the getCount() method to
return the total number of entries. This change provides the total
to onCreate().

Fixes bug 16800358.

Change-Id: I3915c3d5ad642e31d7248226fc91bd4047f16b2d
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
6c9eee87476411faebcfa68c82abaae86344ef91 17-Jul-2014 Sander Alewijnse <salewijnse@google.com> Add warning in the disambig for specific launchers.

For launcher that do not support managed profiles.
Also, ignore the intent after click on those launchers.

Change-Id: I3d5691952a9409755b7cde68a3caba98a3772665
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
09a65601b24b77b7e5b3d2d4c7c30eded1ba1040 21-Jul-2014 Adam Powell <adamp@google.com> Sort ResolverActivity items based on UsageStats

Sort targets by the total amount of time the user has spent with their
containing package in the foreground.

Bug 15694906

Change-Id: I63c956424f78eb22911517674dfefd96901d19f8
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
e49d9393783f2789239f8da536abda9533ffadf0 18-Jul-2014 Adam Powell <adamp@google.com> Add EXTRA_REPLACEMENT_EXTRAS for ACTION_CHOOSER

This allows the calling app to supply a set of alternative extras to
be sent along with the target intent if the user chooses specific
items from the full set available on the device. When replacement
extras have the same key as extras in the initial intent, the
replacement extras dominate.

Change-Id: I5d64c80447386f22402b71291bb289a74015d619
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
278902c982443b3c196aa4642dcf3e0fffe4b23d 13-Jul-2014 Adam Powell <adamp@google.com> Updated "with-default" layout added for ResolverActivity

Add a layout that promotes the last chosen activity to the top for
ResolverActivity. Alter ResolverActivity behavior as appropriate: Only
the last selected activity can be set as default. Different activity
selections take effect immediately. You can only set a default if it
was the last-used target of the intent.

Also add some default strings for invoking common intents to make the
no-title invocations a bit more user-friendly than just, "complete
action using."

Bug 15694906

Change-Id: I8c75d2f812926805c949cc76bab48aa4094e002f
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
4f6c2050a847f4089330b4b0aa4d1deb173e5bd0 08-Jul-2014 Adam Powell <adamp@google.com> ResolverDrawerLayout for ResolverActivity

Internal widget to allow nested scrolling of the grid of intent filter
targets. Initial logic complete.

Bug 15694906

Change-Id: Ib19723146bf1722db6bdd68f95cc6e623462d0f0
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
e9414d922d1ccc0a7834c1863db418dc8be83ab0 06-Jul-2014 Adam Powell <adamp@google.com> ResolverActivity revisions, phase 1

* Switch to grid formatting for items to choose from.

* Format the grid at the bottom of the screen instead of in a formal
dialog.

* Move to newer theming.

Change-Id: Ie1b23800b3a521570f9f62e4cdef620d3fb491d8
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
5044988c4742f2a79d9425ac594ef69a63b22802 23-Jun-2014 Nicolas Prevot <nprevot@google.com> Disable "Always" option for intents targetting non-current user.

In ResolverActivity, if a ResolveInfo is for another user:
disabling the "always" button.

Change-Id: Ib6a1a49e86e3e3546d8aaa70bfd2e8fe148281d6
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
e88b042d1d859ec754ed5a5f366bb560b30f67ec 10-Apr-2014 Xiong Li <xiong.li@sonymobile.com> Activity chooser "Always" button is not working

When ResolverActivity is created with a custom list of matching
applications (rList) as in NFC case, and the alwaysUseOption is
set to true, the prferredActivity is not saved even if the user
presses the "always" button.

When a list is provided the variable mBaseResolveList will be
!= null. This will set mOrigResolveList = null.

When an activity is choosen and one of the buttons are pressed
onIntentSelected is called. The first thing this method does
is to check mAdapter.mOrigResolveList != null, however in this
case mOrigResolveList is always null, and the value is not
saved as PreferredActivity.

This problem was introduced in
6d8dfbd8149942f25f2b9643a12f1fb38f3be834.

Change-Id: I9eac41b7861b5e68ad3978af0dc0285f2a34eb88
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
34d41e9a85f4e2e092b5eb8c7fa4554254650fe4 24-Oct-2013 Amith Yamasani <yamasani@google.com> Only simulate the first click if "Always use" button is available

This prevents Keep from being selected automatically when shown in the Share dialog
if Keep was previously chosen by the user as Always use for a send action.
This was a regression introduced by the new intent disambig behavior.

Bug: 11294904
Change-Id: I6745060a8ee0a6d680e657b55ee46aaec27bbacb
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
b72b363c972ffa70205afdaeb36073ed09d57f76 01-Oct-2013 Christopher Tate <ctate@google.com> Specialized prompting when 'home' has become ambiguous

Bug 9958444

Change-Id: I050ae425e570cfc8ffd473587fb2a6127c36eeec
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
6d8dfbd8149942f25f2b9643a12f1fb38f3be834 24-Sep-2013 Dianne Hackborn <hackbod@google.com> Fix issue #10848916: "Always" button is not working.

The problem was that the ResolverActivity filters some activities
out of the list it shows, but it uses that display list as the
list of components the preference is set against when ultimately
setting it on the package manager... but that filtered list is *not*
the right component set, since it is not the same as the package
manager's view on it.

The fix here is to retain the original set of matching components
and use that when setting the preferred activity. Note that this
does mean that in very unusual cases where filtering is happeing
(such as one of the activities not being exported but being seen
as a possible completion from another app), then you will be setting
the preference for the complete set. Ultimately we probably need
to have the package manager apply these filtering rules up-front so
this is all consistent, but this is a very rare case so not that
important.

And then most of the change here is just improving the debug
output for intent resolution.

Change-Id: Ie35ac2c05a45946439951bbf41433c8b7de79c05
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
07cd351b4a4900bb0e202ff50a335727d706dc30 18-Sep-2013 Amith Yamasani <yamasani@google.com> Don't handle click if the resolver is already finishing.

Fixes bug that double tapping on an entry in the intent disambig dialog
can result in the picked activity being launched twice.

Bug: 10770501
Change-Id: Ibb7c6bea5f3c25fa204a2f0e65c8044c2a2549f7
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
588dd2a3d67435652545645bca9562c066561cda 03-Sep-2013 Amith Yamasani <yamasani@google.com> Don't call setLastChosen if it's a chooser activity instance

Bug: 10605359
Change-Id: If76f5cf2f45442dc25f9bfbd20a4d671b9caa358
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
e9ecc8b49992840249bfb9d5d52b8824dd5de39b 22-Aug-2013 Amith Yamasani <yamasani@google.com> Improve Intent disambig dialog behavior

Keep track of last chosen activity for a particular intent, similar
to how it is tracked for "Always" choices.
Pre-select the last chosen activity if previously the user picked
"Just once".
Downgrade "Always" to "Last chosen" if there's a new kid on the block,
instead of removing it entirely.
Add methods to set and get last chosen entry.

UI - switch from Grid to List.

Bug: 9958096

Change-Id: Ied57147739a3ade1d36c3a7ec1e8ce77e5c5bb16
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
df1c0bf7744d4abd3e2000fcfec01c119b857c75 13-Jun-2013 Dianne Hackborn <hackbod@google.com> Add scheme specific part to IntentFilter.

Change-Id: I063d086cdc742800b8e31ddf2942f2e9230e2785
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
0256c6f8d31c95f730d286b9e2ebae94736f7098 30-May-2013 Adam Powell <adamp@google.com> Optimizations for ResolverActivity

Load app icons using AsyncTask instead of during list item binding.

Make sorting resolved components by display name case insensitive.

Change-Id: I8e69781ed021035b9f0dac349791b3d8a674cf60
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
43a5070e06802734a1e5ea30eb5185dc7a581905 21-Nov-2012 You Kim <you.kim72@gmail.com> resolver list is not cleared on rebuild

Refactoring ResolverActivity.java

Change-Id: I84e6420ff98ddcafd27a52b041ddb1c50e7d7362
Signed-off-by: You Kim <you.kim72@gmail.com>
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
203a2f464cef0d873ba8a6193e288fd25b6dc907 04-Oct-2012 Amith Yamasani <yamasani@google.com> Fix launching home when there are multiple launchers installed

Bug: 7283782

Since ResolverActivity now runs in the correct user, it doesn't need to explicitly
pass in the calling userId. In fact, for the Home case, since ActivityManager is
the one requesting resolution of Home activity, Resolver is running as user 0
instead of the current user.

Removing explicit calls based on the launchingUid fixes the problem.

Change-Id: I4676c155aafaa0dd5cefb1acefa0e7e9c1e20f25
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
4d5c2b03172747843d0549eeea890150a705b86b 27-Sep-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7238170: Edit picture option is not available for the secondary user.

Change-Id: Icb3229f543f286afb4a31e267099eceaa0cca11d
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
14e883b25e0998e3bc4e574a0df3db252d6e987f 18-Aug-2012 Amith Yamasani <yamasani@google.com> Fix merge error

Didn't apply the recent API change from another CL.

Change-Id: I65ac6108909eca7ac48beabb4a8b7bbedda84249
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
a3f133afe885f9e005dfc0584cb7b3b90f75f665 10-Aug-2012 Amith Yamasani <yamasani@google.com> Save preferred activity info with user id.

So each user can have their own set of intent resolution preferences.

ResolverActivity now launches the activity on the correct user, and
persists the preference for the correct user.

Bug: 6961905
Change-Id: I6d3a8a9af89bc649277d4fc8d0f367ee123f8392
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
f02b60aa4f367516f40cf3d60fffae0c6fe3e1b8 16-Aug-2012 Dianne Hackborn <hackbod@google.com> Rename UserId to UserHandle.

This is the start of turning this into a formal public API.

Change-Id: I5786d2c320f1de41a06ed5d0f65adb68967287a0
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
bdda4e74d447812beb92504dc426c9385b3072d1 20-Jul-2012 Adam Powell <adamp@google.com> Fix condition bug in ResolverActivity

Bug 6854356

Change-Id: I3cd060fb78876e80bdfa311cf80d0ad8a696bfad
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
d81cc4ab5a07f4a6c5e553cb67c3aa4fe1dc8b6e 19-Jul-2012 Adam Powell <adamp@google.com> Easy "Just once" launches from ResolverActivity

Allow a second tap of a selected item in ResolverActivity to launch
the target as "just once" for sloppier/quicker choices.

Change-Id: If05fc7c1ac622195f6253e6ca0868fd87954dd46
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
0fc5b2bea09a6d320884c5b12577caf426f547c1 19-Jul-2012 Adam Powell <adamp@google.com> Fun with Up navigation

For activities with a null taskAffinity, simply finish the current task.
(They probably shouldn't have specified a parentActivityName anyway.)

When launching into app info from ResolverActivity, launch the app info
page in the current task with FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET. Back
will return to the resolver, and Up will jump to Settings.

When launching into app info from RecentsPanelView or BaseStatusBar,
since this is a system affordance akin to notifications or widgets,
build the full task stack for the app info activity with
TaskStackBuilder and launch it as a new task.

Change-Id: I73b1941d0f52bd8b30382b5e17edd8ceb058c70d
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
5320eb8938098c9824093f7f842a0a97bbc190a4 18-May-2012 Dianne Hackborn <hackbod@google.com> Fix activity resolver, issues #6519130 and #6507239

6519130: Starting ResolverActivity with no arguments crashes system_server
6507239: ResolverActivity may bypass signature permissions

Change-Id: I64534f781bc6b7eb45e85dbe3a55d351ee28e85c
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
9bee4664f8bc615ad463af5317c77e98744c368a 08-May-2012 Adam Powell <adamp@google.com> Fix some oddities in ResolverActivity

* Fix layout for small-screen devices in landscape.

* Properly re-enable buttons after restoring instance state.

* Scroll to the currently selected item after restoring instance
state.

* Smooth scroll to the currently selected item if the user changes
selection to an item slightly out of view.

* Place grid scroll bar outside the grid's padding.

* Make the current text read a bit more naturally.

Bug 6460135

Change-Id: Ic60330365cdd815e7517f01b36bcdc9d1c857f30
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
589e6f960db7f3c208a218b7d035f01d0c8460ab 07-May-2012 Adam Powell <adamp@google.com> Better screen size adaptation for ResolverActivity

Change-Id: I2c982c0b7c722ca7cad46cc23ac8d161bee3a1ff
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
c587861fe8c59b7f112c333838630b54ab2b38af 05-May-2012 Adam Powell <adamp@google.com> Revisions to ResolverActivity

Bug 6428812

Change ResolverActivity to use a grid rather than a list, and present
buttons for "Use Always" and "Just Once". Use large launcher icons
when appropriate.

Change-Id: I177360a727cbc4b401ffbcea83d1b3dac1de5744
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
d44713a63d51ba7f186c775c2a32f3c2ce018037 01-May-2012 Dianne Hackborn <hackbod@google.com> Fix issue #6234928: android.app.IntentReceiverLeaked:

Activity com.android.internal.app.ChooserActivity has leaked IntentReceiver

Change-Id: I02488931d8c02ecbe0c6fc2f7ce708a9dc406f67
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
d0d7503fd3e941113094532f28986f49b11b5fdb 20-Apr-2012 Dianne Hackborn <hackbod@google.com> Move handling of package changes to a background thread.

Helps get rid of some jank when installing applications.

Change-Id: I97d0022f82d67796e334d37086e5911dd6ca6b62
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
2d80962b2e93ae4e59d0197487bd0f6aad4cf26e 22-Mar-2012 Adam Powell <adamp@google.com> Let users reach app details from ResolverActivity

A long press on a list item in ResolverActivity (shown when users are
asked to choose an activity to complete an action) will now open
the app detail settings for the package providing that item.

This is a work in progress; awaiting more UX input on other changes
and better discoverability of this feature.

Change-Id: I2cc07c5520fdd23cf1a43f169b114295f5d9d0ac
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
e8f2c7ff5abe339061f1823362e12b912c430c1a 02-Mar-2012 Dianne Hackborn <hackbod@google.com> Make ResolverActivity update dynamically.

Watches for package changes so it can dynamically adjust
to reflect the actual list of available activities.

Change-Id: I3a2fef3dac4d13d1b2a7ed6fc117a7b814679669
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
905577f6345c014fc2489a8068ea967ba8c18012 08-Sep-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5263361: Browser instance not created in application picker

The resolver activity was hiding the following activity from recents.

Also some other fixes: a little better memory use debugging, removed
some unneeded code from window manager, moved some system activities
into their own process, added some more running process information for
manage apps.

Change-Id: I66687d16989ff965d524b92dc360f37c19199717
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
43a17654cf4bfe7f1ec22bd8b7b32daccdf27c09 07-Apr-2011 Joe Onorato <joeo@google.com> Remove the deprecated things from Config.java. These haven't been working since before 1.0.

Change-Id: Ic2e8fa68797ea9d486f4117f3d82c98233cdab1e
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
bce6f8f249ff2b65df9ed790cc460053ab8eccec 13-Mar-2011 Mike Lockwood <lockwood@android.com> Add a dialog to ask user to start an application for a USB device or accessory

This is used when there is only one application available and the user has
not chosen to start it by default.
If more than one application is available we continue to use UsbResolverActivity

Bug: 4074719

Change-Id: Id61f2ccc6de5b9ac70fb4670006ff1fee2028d55
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
02eb8746de2d60563ec2751a34d20923192e4293 27-Feb-2011 Mike Lockwood <lockwood@android.com> UsbManager: Enhancements for managing USB devices and accessories

When a USB device or accessory is connected, the UsbService now asks the
user which application to associate with the device or accessory.
Applications interested in devices or accessories must specify the
devices they work with via meta-data attached to their manifest.
Permission to communicate with the device is assigned when the user chooses
the activity to use for the device.
The user has the option of clicking the "always use this application" checkbox
to make the assignment automatic in the future.
The user may later clear this preference and revoke permission for an application
to have permission to communicate with the device by clicking the "Clear defaults"
button for the activity in the Manage Applications panel in Settings.

Added class UsbResolveActivity (a subclass or ResolveActivity for choosing
an activity for a USB device or accessory)

Added UsbDeviceManager, which manages the mapping between USB devices/accessories
and applications, including default applications for devices and accessories,
and manages application permissions.

Add interface to allow Settings to clear device and accessory
preferences and permissions for an application.

Remove obsolete ACCESS_USB permission.

Add new signatureOrSystem MANAGE_USB permission to allow administrating
preferences and permissions.

Moved UsbService.java to a "usb" subdirectory, along with new classes
UsbResolveActivity and UsbDeviceManager.

Change-Id: I92554381e9779e68ce380daaee4e1401fb875703
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
d88e9aa575eb3a9d20cdb0e8918d54993e1ce1e0 24-Jan-2011 Jeff Hamilton <jham@android.com> Use classnames instead of ints for NFC techs.

This makes the system more flexible and allows
adding new technology types without having to
update the API.

Change-Id: Iaee6b633965e501a70e8afc3f1d54d9d94a4d05a
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
5ef402baafc4818ccdf2aaec5da9cf25dd1c0e12 27-Mar-2010 Dianne Hackborn <hackbod@google.com> Fix issue #2538228: Intents targeting browsers constantly nagging

Some applications are setting the MIME type field for an http:
intent, which is technically wrong because the recipient opening
the URI will get the MIME type from the header. This was hitting
a bug when we compute the intent filter when setting the
preferred activity, where we have to set both the MIME type and
data URI for the intent filter. (For file: and content: URIs
only the MIME type is needed, since these can be opened directly
through ContentResolver so everyone is presumed to be able to
handle them.)

Change-Id: Ia7025e6859e9c90997bf56c2c80f225fca7a2007
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
eb034652c2037a47ebfd99779e8383bb8bb528af 07-Sep-2009 Dianne Hackborn <hackbod@google.com> Implement all of the infrastructure for configuring wallpapers.

Actually being able to configure a wallpaper relies on additional
work in the launcher and wallpapers that will be in another change.
Also note that this breaks all existing wallpapers, since they now
need to include a meta-data item about themselves. This also
will be fixed in another change.

Change-Id: I97d2c2bd07237abc32f92b9147c32530a2f73c71
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/java/com/android/internal/app/ResolverActivity.java