Fix installKeyPair cred mng app access control
* Should not be user selectable Bug: 186159641 Test: atest android.devicepolicy.cts.CredentialManagementAppTest Change-Id: Ie1ddbe79ed5fe6e9aba33aeb3fd92fe275a48d47
This commit is contained in:
@@ -5457,7 +5457,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),
|
||||
|
||||
Reference in New Issue
Block a user