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

Commit 917c4e4d authored by Svetoslav's avatar Svetoslav Committed by Android (Google) Code Review
Browse files

Merge "Clear binder identity before reaching into keyguard settings"

parents 3e452a9b 5bd5d4c2
Loading
Loading
Loading
Loading
+19 −14
Original line number Diff line number Diff line
@@ -1630,6 +1630,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
        // sufficiently what is currently set.  Note that this is only
        // a sanity check in case the two get out of sync; this should
        // never normally happen.
        final long identity = Binder.clearCallingIdentity();
        try {
            LockPatternUtils utils = new LockPatternUtils(mContext);
            if (utils.getActivePasswordQuality(userHandle) < policy.mActivePasswordQuality) {
                Slog.w(LOG_TAG, "Active password quality 0x"
@@ -1645,6 +1647,9 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                policy.mActivePasswordSymbols = 0;
                policy.mActivePasswordNonLetter = 0;
            }
        } finally {
            Binder.restoreCallingIdentity(identity);
        }

        validatePasswordOwnerLocked(policy);
        syncDeviceCapabilitiesLocked(policy);