From b4299d92e6d2679dc083e8cf6b21d56649a7059a Mon Sep 17 00:00:00 2001 From: Jordan Liu Date: Wed, 26 Sep 2018 12:49:11 -0700 Subject: Dismiss SIM lock page after correct SIM Previously the criteria was to dismiss if: 1. There is no pin/password/pattern set AND 2. the lockscreen is disabled. This behaved incorrectly in the case where the lockscreen is enabled but there is no pin/password/pattern set. We fix the condition so that now we dismiss the SIM lock if: 1. There is no pin/password/pattern set OR 2. the lockscreen is disabled. Fixes: 115780994 Test: manual Change-Id: I88da896add635126934eb0ed22e617ac2607f15a --- .../src/com/android/keyguard/KeyguardSecurityContainer.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'packages/SystemUI/src') diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java index cb5a0507815b..57ca8b073db5 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java @@ -342,12 +342,11 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe case SimPuk: // Shortcut for SIM PIN/PUK to go to directly to user's security screen or home SecurityMode securityMode = mSecurityModel.getSecurityMode(targetUserId); - if (securityMode != SecurityMode.None - || !mLockPatternUtils.isLockScreenDisabled( + if (securityMode == SecurityMode.None || mLockPatternUtils.isLockScreenDisabled( KeyguardUpdateMonitor.getCurrentUser())) { - showSecurityScreen(securityMode); - } else { finish = true; + } else { + showSecurityScreen(securityMode); } break; -- cgit v1.2.3-59-g8ed1b