diff options
author | Fabrice Di Meglio <fdimeglio@google.com> | 2015-04-09 15:55:42 -0700 |
---|---|---|
committer | Fabrice Di Meglio <fdimeglio@google.com> | 2015-04-09 16:19:44 -0700 |
commit | e48c137acdddd477d671417eb93ec120a1931cbb (patch) | |
tree | 29f6814a6f1d1b5471777fa6d1b70ac311cb8d77 /core/java/android/content | |
parent | 53f35f4a20f69a61b83b88b666e85277d07e9de0 (diff) | |
download | frameworks_base-e48c137acdddd477d671417eb93ec120a1931cbb.zip frameworks_base-e48c137acdddd477d671417eb93ec120a1931cbb.tar.gz frameworks_base-e48c137acdddd477d671417eb93ec120a1931cbb.tar.bz2 |
Add IntentFilter auto verification - part 5
- optimize IntentFilter verification: dont do stuff we dont want
if we dont need to do them.
- improve IntentFilter candidates filtering and also improve
at the same time fix for bug #20128771: we can return the candidates
list rigth the way if the Intent is not related to a Web data URI and
include the "undefined verification state" ones if the first filtering
pass does not leave any.
Change-Id: I19f5c060f58b93530e37b4425d19ed23d2a0f4c0
Diffstat (limited to 'core/java/android/content')
-rw-r--r-- | core/java/android/content/pm/PackageParser.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index 6b9d3f8..7523675 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -2778,7 +2778,7 @@ public class PackageParser { } /** - * Check if one of the IntentFilter as an action VIEW and a HTTP/HTTPS data URI + * Check if one of the IntentFilter as both actions DEFAULT / VIEW and a HTTP/HTTPS data URI */ private static boolean hasDomainURLs(Package pkg) { if (pkg == null || pkg.activities == null) return false; @@ -2792,6 +2792,7 @@ public class PackageParser { for (int m=0; m<countFilters; m++) { ActivityIntentInfo aii = filters.get(m); if (!aii.hasAction(Intent.ACTION_VIEW)) continue; + if (!aii.hasAction(Intent.ACTION_DEFAULT)) continue; if (aii.hasDataScheme(IntentFilter.SCHEME_HTTP) || aii.hasDataScheme(IntentFilter.SCHEME_HTTPS)) { Slog.d(TAG, "hasDomainURLs:true for package:" + pkg.packageName); |