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

Commit 8297f686 authored by Ayush Sharma's avatar Ayush Sharma Committed by Android (Google) Code Review
Browse files

Merge "Restrict getPasswordMinimumMetrics to system callers"

parents 35c010ed e53f69bb
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -4567,7 +4567,9 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
    public PasswordMetrics getPasswordMinimumMetrics(@UserIdInt int userHandle,
            boolean deviceWideOnly) {
        final CallerIdentity caller = getCallerIdentity();
        Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle));
        Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle)
                && (isSystemUid(caller) || hasCallingOrSelfPermission(
                permission.SET_INITIAL_LOCK)));
        return getPasswordMinimumMetricsUnchecked(userHandle, deviceWideOnly);
    }