summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Prevot <nprevot@google.com>2015-07-15 14:54:45 +0100
committerNicolas Prevot <nprevot@google.com>2015-07-16 10:13:00 +0100
commitdbdf7c45380f7701e029a279932d2c97bf55fdc9 (patch)
treea9e650ec31508f0cfca97255400e2afd632a2763
parent47e0409062a2ac5a480fc1a57e443b75ce0f1dab (diff)
downloadframeworks_base-dbdf7c45380f7701e029a279932d2c97bf55fdc9.zip
frameworks_base-dbdf7c45380f7701e029a279932d2c97bf55fdc9.tar.gz
frameworks_base-dbdf7c45380f7701e029a279932d2c97bf55fdc9.tar.bz2
Don't send app links to the parent if status = never (part 2)
To qualify for cross-profile app linking, an intent should resolve with a better status than "NEVER". Moved this check from canForwardTo into the source method, getCrossProfileDomainPreferredLpr, to stop bad resolutions leaking out. BUG:22287521 Change-Id: I195979d78a783864d841a81f358780912bbf168e
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index eb84e18..2a08c34 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -4417,9 +4417,7 @@ public class PackageManagerService extends IPackageManager.Stub {
synchronized(mPackages) {
CrossProfileDomainInfo xpDomainInfo = getCrossProfileDomainPreferredLpr(
intent, resolvedType, 0, sourceUserId, parent.id);
- return xpDomainInfo != null
- && xpDomainInfo.bestDomainVerificationStatus !=
- INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_NEVER;
+ return xpDomainInfo != null;
}
}
return false;
@@ -4576,6 +4574,11 @@ public class PackageManagerService extends IPackageManager.Stub {
result.bestDomainVerificationStatus);
}
}
+ // Don't consider matches with status NEVER across profiles.
+ if (result != null && result.bestDomainVerificationStatus
+ == INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_NEVER) {
+ return null;
+ }
return result;
}