From 649efc68cb3cd9648db6801989108c79f99dc1f2 Mon Sep 17 00:00:00 2001 From: Fabrice Di Meglio Date: Wed, 13 May 2015 16:17:11 -0700 Subject: [PATCH] Add IntentFilter auto verification - part 10 - tune Intent resolution candidates filtering: remove the undefinedList from the results and then add it again it there is no more candidates. See bug #19628271 Change-Id: I9ab077f6a431367be8bab30c134d34e1e7ac51ed --- .../core/java/com/android/server/pm/PackageManagerService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index 477af7262c552..fdfe55a6104b8 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -4154,7 +4154,7 @@ public class PackageManagerService extends IPackageManager.Stub { } // 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 Browser Apps ones. + // 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 // let the User decide with the Disambiguation dialog if there are several ones. if (result.size() == 0) { @@ -4162,6 +4162,7 @@ public class PackageManagerService extends IPackageManager.Stub { } result.removeAll(neverList); result.removeAll(matchAllList); + result.removeAll(undefinedList); if (result.size() == 0) { result.addAll(undefinedList); if ((flags & MATCH_ALL) != 0) {