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

Commit 6f7d1445 authored by Eric Biggers's avatar Eric Biggers Committed by Automerger Merge Worker
Browse files

DPMS: allow getPasswordMinimumMetrics() to anyone who can set LSKF am: f30bd8b6

parents 9a3ec893 f30bd8b6
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -5127,8 +5127,11 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
            boolean deviceWideOnly) {
        final CallerIdentity caller = getCallerIdentity();
        Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle)
                && (isSystemUid(caller) || hasCallingOrSelfPermission(
                permission.SET_INITIAL_LOCK)));
                && (isSystemUid(caller)
                    // Accept any permission that ILockSettings#setLockCredential() accepts.
                    || hasCallingOrSelfPermission(permission.SET_INITIAL_LOCK)
                    || hasCallingOrSelfPermission(permission.SET_AND_VERIFY_LOCKSCREEN_CREDENTIALS)
                    || hasCallingOrSelfPermission(permission.ACCESS_KEYGUARD_SECURE_STORAGE)));
        return getPasswordMinimumMetricsUnchecked(userHandle, deviceWideOnly);
    }