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
This commit is contained in:
Winson
2021-05-25 09:28:27 -07:00
parent bd62d13f49
commit 320bc8ff92

View File

@@ -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);
}
}