Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06abbc7d authored by Alex Johnston's avatar Alex Johnston
Browse files

Fix installKeyPair cred mng app access control

* Should not be user selectable

Bug: 186159641
Test: atest android.devicepolicy.cts.CredentialManagementAppTest
Change-Id: Ie1ddbe79ed5fe6e9aba33aeb3fd92fe275a48d47
parent f715fddd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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),