diff options
author | Christopher Tate <ctate@google.com> | 2015-07-16 00:20:55 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-07-16 00:21:12 +0000 |
commit | 3b1f8607fdc416a87e608499698719f3234ecc90 (patch) | |
tree | db270b852eed83509e22f16b49af7ecad20a986b /services | |
parent | 008409a2ea1feed095d53ce51429e4fed964c50c (diff) | |
parent | ac15b1b0c05c79f5939aa6f88e973d4d479946cb (diff) | |
download | frameworks_base-3b1f8607fdc416a87e608499698719f3234ecc90.zip frameworks_base-3b1f8607fdc416a87e608499698719f3234ecc90.tar.gz frameworks_base-3b1f8607fdc416a87e608499698719f3234ecc90.tar.bz2 |
Merge "Intent filters need CATEGORY_BROWSABLE to be app-linking eligible" into mnc-dev
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/pm/PackageManagerService.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index 221e925..eb84e18 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -801,12 +801,9 @@ public class PackageManagerService extends IPackageManager.Stub { } private static boolean hasValidDomains(ActivityIntentInfo filter) { - boolean hasHTTPorHTTPS = filter.hasDataScheme(IntentFilter.SCHEME_HTTP) || - filter.hasDataScheme(IntentFilter.SCHEME_HTTPS); - if (!hasHTTPorHTTPS) { - return false; - } - return true; + return filter.hasCategory(Intent.CATEGORY_BROWSABLE) + && (filter.hasDataScheme(IntentFilter.SCHEME_HTTP) || + filter.hasDataScheme(IntentFilter.SCHEME_HTTPS)); } private IntentFilterVerifier mIntentFilterVerifier; @@ -15075,8 +15072,9 @@ public class PackageManagerService extends IPackageManager.Stub { } if (filters != null && filters.size() > 0) { for (IntentFilter filter : filters) { - if (filter.hasDataScheme(IntentFilter.SCHEME_HTTP) || - filter.hasDataScheme(IntentFilter.SCHEME_HTTPS)) { + if (filter.hasCategory(Intent.CATEGORY_BROWSABLE) + && (filter.hasDataScheme(IntentFilter.SCHEME_HTTP) || + filter.hasDataScheme(IntentFilter.SCHEME_HTTPS))) { result.addAll(filter.getHostsList()); } } |