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

Commit 748856b3 authored by Robert Burns's avatar Robert Burns
Browse files

Fix lock screen timeouts

- Currently, if slide lock delays are enabled and then user switches to a secure lock screen, the slide delays were still being utilized
- This patch fixes the logic around whether to utilize the slide delay setting

Change-Id: I44d8b8dcb04468ca069c7967a753038090d34133
parent 1f0e2706
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -623,9 +623,6 @@ public class KeyguardViewMediator {
        // having to unlock the screen)
        final ContentResolver cr = mContext.getContentResolver();

        boolean separateSlideLockTimeoutEnabled = Settings.System.getInt(cr,
                Settings.System.SCREEN_LOCK_SLIDE_DELAY_TOGGLE, 0) == 1;

        // From DisplaySettings
        long displayTimeout = Settings.System.getInt(cr, SCREEN_OFF_TIMEOUT,
                KEYGUARD_DISPLAY_TIMEOUT_DELAY_DEFAULT);
@@ -636,6 +633,12 @@ public class KeyguardViewMediator {
                KEYGUARD_LOCK_AFTER_DELAY_DEFAULT);

        // From CyanogenMod specific Settings
        // If utilizing a secured lock screen, we should not utilize the slide
        // delay and should let it default to the standard delay
        boolean separateSlideLockTimeoutEnabled = (mLockPatternUtils.isSecure() ? false
                : Settings.System.getInt(cr,
                        Settings.System.SCREEN_LOCK_SLIDE_DELAY_TOGGLE, 0) == 1);

        int slideLockTimeoutDelay = (mSlideLockDelay == WindowManagerPolicy.OFF_BECAUSE_OF_TIMEOUT ? Settings.System
                .getInt(cr, Settings.System.SCREEN_LOCK_SLIDE_TIMEOUT_DELAY,
                        KEYGUARD_LOCK_AFTER_DELAY_DEFAULT) : Settings.System.getInt(cr,