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

Commit 423bf3d0 authored by Svetoslav's avatar Svetoslav Committed by Android Git Automerger
Browse files

am cf0e4706: am 8ff6d70d: Merge "Clear identity before calling into the mount...

am cf0e4706: am 8ff6d70d: Merge "Clear identity before calling into the mount service." into lmp-dev

* commit 'cf0e4706':
  Clear identity before calling into the mount service.
parents 3eddddb5 cf0e4706
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -1610,11 +1610,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) {