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
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
index cb5a050..57ca8b0 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
@@ -342,12 +342,11 @@
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;