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

Commit 9f70a4cc authored by Svetoslav's avatar Svetoslav
Browse files

Clear identity before calling into the mount service.

bug:17787265

Change-Id: I4b9268d101e9ccfc30876fbf54bf28bb41fb4be6
parent 900e3b5f
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -1604,11 +1604,16 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
        if (userState.mUserId != UserHandle.USER_OWNER) {
            return;
        }
        final long identity = Binder.clearCallingIdentity();
        try {
            if (hasRunningServicesLocked(userState) && LockPatternUtils.isDeviceEncrypted()) {
                // If there are running accessibility services we do not have encryption as
                // the user needs the accessibility layer to be running to authenticate.
                mLockPatternUtils.clearEncryptionPassword();
            }
        } finally {
            Binder.restoreCallingIdentity(identity);
        }
    }

    private boolean hasRunningServicesLocked(UserState userState) {