diff options
author | Fabrice Di Meglio <fdimeglio@google.com> | 2015-05-13 18:17:12 -0700 |
---|---|---|
committer | Fabrice Di Meglio <fdimeglio@google.com> | 2015-05-13 18:17:12 -0700 |
commit | b371c7b6e234bda71a0266e67722c859227f643c (patch) | |
tree | 569271e104f6f2a81abe50b262184f83d5d87ada | |
parent | 649efc68cb3cd9648db6801989108c79f99dc1f2 (diff) | |
download | frameworks_base-b371c7b6e234bda71a0266e67722c859227f643c.zip frameworks_base-b371c7b6e234bda71a0266e67722c859227f643c.tar.gz frameworks_base-b371c7b6e234bda71a0266e67722c859227f643c.tar.bz2 |
Add IntentFilter auto verification - part 11
- tune Intent resolution candidates filtering: add also the undefinedList
into the results at first so that when you install an App which is not
verified (after installing a verified App) you will still have the
Disambiguation Dialog prompted to the User.
See bug #19628271
Change-Id: I611fff4c1c7f60db22312d7948c8d5120719fbd0
-rw-r--r-- | services/core/java/com/android/server/pm/PackageManagerService.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index fdfe55a..eaaee93 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -4130,7 +4130,9 @@ public class PackageManagerService extends IPackageManager.Stub { synchronized (mPackages) { final int count = candidates.size(); - // First, try to use the domain prefered App + // First, try to use the domain prefered App. Partition the candidates into four lists: + // one for the final results, one for the "do not use ever", one for "undefined status" + // and finally one for "Browser App type". for (int n=0; n<count; n++) { ResolveInfo info = candidates.get(n); String packageName = info.activityInfo.packageName; @@ -4152,19 +4154,19 @@ public class PackageManagerService extends IPackageManager.Stub { } } } + // Add all undefined Apps as we want them to appear in the Disambiguation dialog. + result.addAll(undefinedList); // If there is nothing selected, add all candidates and remove the ones that the User // has explicitely put into the INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_NEVER state and - // also remove any undefined ones and Browser Apps ones. - // If there is still none after this pass, add all undefined one and Browser Apps and + // also remove Browser Apps ones. + // If there is still none after this pass, add all Browser Apps and // let the User decide with the Disambiguation dialog if there are several ones. if (result.size() == 0) { result.addAll(candidates); } result.removeAll(neverList); result.removeAll(matchAllList); - result.removeAll(undefinedList); if (result.size() == 0) { - result.addAll(undefinedList); if ((flags & MATCH_ALL) != 0) { result.addAll(matchAllList); } else { |