From ff91ef8ed1156e29af212417c290c295eb7e0320 Mon Sep 17 00:00:00 2001 From: Nicolas Prevot Date: Thu, 22 Oct 2015 14:55:26 +0100 Subject: Don't resolve cross-profile app links without intent picker. If ALLOW_CROSS_PROFILE_APP_LINKING has been set: If there is an app with status always across profiles, and some apps without status always in the current profile: show an intent picker instead of directly resolving across profiles. BUG:25109215 Change-Id: I74a67d231284ce912121ea0818109fbf904183e8 --- .../core/java/com/android/server/pm/PackageManagerService.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'services/core') diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index 6bf3001..61e5acc 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -4772,18 +4772,13 @@ public class PackageManagerService extends IPackageManager.Stub { // First try to add the "always" resolution(s) for the current user, if any if (alwaysList.size() > 0) { result.addAll(alwaysList); - // if there is an "always" for the parent user, add it. - } else if (xpDomainInfo != null && xpDomainInfo.bestDomainVerificationStatus - == INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS) { - result.add(xpDomainInfo.resolveInfo); } else { // Add all undefined apps as we want them to appear in the disambiguation dialog. result.addAll(undefinedList); + // Maybe add one for the other profile. if (xpDomainInfo != null && ( xpDomainInfo.bestDomainVerificationStatus - == INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED - || xpDomainInfo.bestDomainVerificationStatus - == INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ASK)) { + != INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_NEVER)) { result.add(xpDomainInfo.resolveInfo); } includeBrowser = true; -- cgit v1.1