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

Commit 69b43b49 authored by Robin Lee's avatar Robin Lee Committed by Android (Google) Code Review
Browse files

Merge "Remove enforceManagedProfile for listing keyguard features"

parents 1b2bc40b a9e460ae
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2940,7 +2940,6 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
            return 0;
        }
        enforceCrossUserPermission(userHandle);
        enforceNotManagedProfile(userHandle, "list disabled keyguard features");
        synchronized (this) {
            if (who != null) {
                ActiveAdmin admin = getActiveAdminUncheckedLocked(who, userHandle);
@@ -3170,7 +3169,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {

    private void enforceNotManagedProfile(int userHandle, String message) {
        if(isManagedProfile(userHandle)) {
            throw new SecurityException("You can not " + message + " from a managed profile. ");
            throw new SecurityException("You can not " + message + " for a managed profile. ");
        }
    }