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

Commit 443e44c2 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:...

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

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2775380



Change-Id: I62ac0c15ba73a8ef66efb5ea1d093c8e54bad406
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 0de31c77 cf663bce
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -5126,8 +5126,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);
    }