summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2015-07-15 16:56:58 -0700
committerChristopher Tate <ctate@google.com>2015-07-15 16:56:58 -0700
commitac15b1b0c05c79f5939aa6f88e973d4d479946cb (patch)
treea6b048c1bb6198c8175b4a8a1900bdd3c8fbf6b0 /services
parentf6586cbde7d4612963eb2e8a2413235630676b83 (diff)
downloadframeworks_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.java14
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());
}
}