From 320bc8ff92a50cc8ddffb8ff8da4628bef26cecd Mon Sep 17 00:00:00 2001 From: Winson Date: Tue, 25 May 2021 09:28:27 -0700 Subject: [PATCH] Only add parent profile resolution if strictly greater Don't show the intent dialog if the personal profile has an app that is the same level of verification, instead just immediate open the work profile app. Bug: 188545047 Test: manual, tested as part of ongoing CTS development Change-Id: Ifaac12dc5582a0ee488a964b3d48216d98cd43d9 --- .../java/com/android/server/pm/PackageManagerService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index 14861c2ddf4c4..b84ca06e7ac9f 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -2681,9 +2681,9 @@ public class PackageManagerService extends IPackageManager.Stub } else { result.addAll(approvedInfos); - // If the other profile has an app that's of equal or higher approval, add it + // If the other profile has an app that's higher approval, add it if (xpDomainInfo != null - && xpDomainInfo.highestApprovalLevel >= highestApproval) { + && xpDomainInfo.highestApprovalLevel > highestApproval) { result.add(xpDomainInfo.resolveInfo); } }