diff options
author | Christopher Tate <ctate@google.com> | 2015-07-15 16:56:58 -0700 |
---|---|---|
committer | Christopher Tate <ctate@google.com> | 2015-07-15 16:56:58 -0700 |
commit | ac15b1b0c05c79f5939aa6f88e973d4d479946cb (patch) | |
tree | a6b048c1bb6198c8175b4a8a1900bdd3c8fbf6b0 /services | |
parent | f6586cbde7d4612963eb2e8a2413235630676b83 (diff) | |
download | frameworks_base-ac15b1b0c05c79f5939aa6f88e973d4d479946cb.zip frameworks_base-ac15b1b0c05c79f5939aa6f88e973d4d479946cb.tar.gz frameworks_base-ac15b1b0c05c79f5939aa6f88e973d4d479946cb.tar.bz2 |
Intent filters need CATEGORY_BROWSABLE to be app-linking eligible
Bug 22504009
Change-Id: I565b2ba4d1e5deeee8ede3363819deec206dbf58
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()); } } |