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

Commit f3c5834c authored by Clara Bayarri's avatar Clara Bayarri Committed by Android (Google) Code Review
Browse files

Merge "Work Challenge unlock to home instead of locked app"

parents 2b87fe0e f0649ceb
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -11265,9 +11265,13 @@ public final class ActivityManagerService extends ActivityManagerNative
                    + android.Manifest.permission.DEVICE_POWER);
        }
        final int user = UserHandle.myUserId();
        synchronized(this) {
            long ident = Binder.clearCallingIdentity();
            try {
                if (!shown && mStackSupervisor.isFocusedUserLockedProfile()) {
                    startHomeActivityLocked(user, "setLockScreenShown");
                }
                if (DEBUG_LOCKSCREEN) logLockScreen(" shown=" + shown);
                mLockScreenShown = shown ? LOCK_SCREEN_SHOWN : LOCK_SCREEN_HIDDEN;
                updateSleepIfNeededLocked();
+6 −0
Original line number Diff line number Diff line
@@ -692,6 +692,12 @@ public final class ActivityStackSupervisor implements DisplayListener {
        return null;
    }

    boolean isFocusedUserLockedProfile() {
        final int userId = mFocusedStack.topRunningActivityLocked().userId;
        return userId != UserHandle.myUserId()
                && mService.mUserController.shouldConfirmCredentials(userId);
    }

    void setNextTaskIdForUserLocked(int taskId, int userId) {
        final int currentTaskId = mCurTaskIdForUser.get(userId, -1);
        if (taskId > currentTaskId) {