Skip to content

Commit 748856b

Browse files
committed
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
1 parent 1f0e270 commit 748856b

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -623,9 +623,6 @@ private void doKeyguardLaterLocked() {
623623
// having to unlock the screen)
624624
final ContentResolver cr = mContext.getContentResolver();
625625

626-
boolean separateSlideLockTimeoutEnabled = Settings.System.getInt(cr,
627-
Settings.System.SCREEN_LOCK_SLIDE_DELAY_TOGGLE, 0) == 1;
628-
629626
// From DisplaySettings
630627
long displayTimeout = Settings.System.getInt(cr, SCREEN_OFF_TIMEOUT,
631628
KEYGUARD_DISPLAY_TIMEOUT_DELAY_DEFAULT);
@@ -636,6 +633,12 @@ private void doKeyguardLaterLocked() {
636633
KEYGUARD_LOCK_AFTER_DELAY_DEFAULT);
637634

638635
// From CyanogenMod specific Settings
636+
// If utilizing a secured lock screen, we should not utilize the slide
637+
// delay and should let it default to the standard delay
638+
boolean separateSlideLockTimeoutEnabled = (mLockPatternUtils.isSecure() ? false
639+
: Settings.System.getInt(cr,
640+
Settings.System.SCREEN_LOCK_SLIDE_DELAY_TOGGLE, 0) == 1);
641+
639642
int slideLockTimeoutDelay = (mSlideLockDelay == WindowManagerPolicy.OFF_BECAUSE_OF_TIMEOUT ? Settings.System
640643
.getInt(cr, Settings.System.SCREEN_LOCK_SLIDE_TIMEOUT_DELAY,
641644
KEYGUARD_LOCK_AFTER_DELAY_DEFAULT) : Settings.System.getInt(cr,

0 commit comments

Comments
 (0)