Merge "Fix installKeyPair cred mng app access control" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-04-23 13:24:48 +00:00
committed by Android (Google) Code Review

View File

@@ -5459,7 +5459,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
&& (isProfileOwner(caller) || isDeviceOwner(caller)))
|| (caller.hasPackage() && (isCallerDelegate || isCredentialManagementApp)));
if (isCredentialManagementApp) {
Preconditions.checkCallAuthorization(isUserSelectable, "The credential "
Preconditions.checkCallAuthorization(!isUserSelectable, "The credential "
+ "management app is not allowed to install a user selectable key pair");
Preconditions.checkCallAuthorization(
isAliasInCredentialManagementAppPolicy(caller, alias),