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

Commit 5bd5d4c2 authored by Svetoslav's avatar Svetoslav
Browse files

Clear binder identity before reaching into keyguard settings

Change-Id: I80eeaed235acc165ddd4799ba46700afea2dff55
parent 3f3a2a87
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);