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

Commit 71c85387 authored by Sam Mortimer's avatar Sam Mortimer Committed by Bruno Martins
Browse files

SystemUI: Prevent loop with display timeout

* When no secure lock screen is set and the display
  times out, it immediately turns on again
* Do not trigger showing the keyguard when we don't
  actually need it

Change-Id: I685329e74afb0af79b5d8843ba9d3af2ee6377d4
parent 688435f2
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -836,8 +836,9 @@ public class KeyguardViewMediator extends SystemUI {
                }
            } else if (mShowing) {
                mPendingReset = true;
            } else if ((why == WindowManagerPolicyConstants.OFF_BECAUSE_OF_TIMEOUT && timeout > 0)
                    || (why == WindowManagerPolicyConstants.OFF_BECAUSE_OF_USER && !lockImmediately)) {
            } else if (((why == WindowManagerPolicyConstants.OFF_BECAUSE_OF_TIMEOUT && timeout > 0)
                    || why == WindowManagerPolicyConstants.OFF_BECAUSE_OF_USER) &&
                    !lockImmediately) {
                doKeyguardLaterLocked(timeout);
                mLockLater = true;
            } else if (!mLockPatternUtils.isLockScreenDisabled(currentUser)) {