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

Commit e9a24d0a authored by Ian Pedowitz's avatar Ian Pedowitz Committed by Android (Google) Code Review
Browse files

Merge "Fix crash in KeyguardManager.isDeviceLocked"

parents 6a13e3be 078e91b0
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -664,11 +664,16 @@ public class TrustManagerService extends SystemService {
        public boolean isDeviceLocked(int userId) throws RemoteException {
            userId = ActivityManager.handleIncomingUser(getCallingPid(), getCallingUid(), userId,
                    false /* allowAll */, true /* requireFull */, "isDeviceLocked", null);

            long token = Binder.clearCallingIdentity();
            try {
                if (!mLockPatternUtils.isSeparateProfileChallengeEnabled(userId)) {
                    userId = resolveProfileParent(userId);
                }

                return isDeviceLockedInner(userId);
            } finally {
                Binder.restoreCallingIdentity(token);
            }
        }

        @Override