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

Commit ba7ff40f authored by Daniel Tschinder's avatar Daniel Tschinder
Browse files

Fix security timeout to respect lockscreen-disable-option

Change I21d8e634 introduced the new lockscreen-security-timeouts.
This change was not respecting the option "Disable slider on security", which
was uploaded with change I03a9b381.

Change-Id: Ibabe7b6d6f8e4f5bd648cb75a96ba06bea73aa9d
parent 862a19b7
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -587,14 +587,17 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
        // report false
        mLockedButNotYetSecured = lockedButNotSecured;

        // Pattern unlock screen shows immediately. All others follow the
        // progression of Lock -> Unlock, so only Pattern lock requires this
        // state to be changed.
        if (!lockedButNotSecured && mMode != Mode.UnlockScreen
                && this.mLockPatternUtils.isLockPatternEnabled()) {
            updateScreen(Mode.UnlockScreen);
        } else
        if (lockedButNotSecured && mMode != Mode.LockScreen) {
        if (!lockedButNotSecured) {
            // At this point we are security locking the phone
            // So get the initialMode and set it, if it's different
            // to current mode.
            // getInitialMode() handles, if there should be an slider-
            // lock in front of security lock.
            Mode initialMode = getInitialMode();
            if (mMode != initialMode) {
                updateScreen(initialMode);
            }
        } else if (lockedButNotSecured && mMode != Mode.LockScreen) {
            // If lockedButNotSecured is enabled, frob the screen to lock
            updateScreen(Mode.LockScreen);
        } else {