summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityModel.java
diff options
context:
space:
mode:
authorPengquan Meng <mpq@google.com>2017-10-11 17:43:33 -0700
committerPengquan Meng <mpq@google.com>2017-10-11 17:43:39 -0700
commit4b267dfe12c79c7b67bac57111a6a83c3b4ba9d0 (patch)
tree7a2344315e21d2fa381437f704223ce62e612353 /packages/SystemUI/src/com/android/keyguard/KeyguardSecurityModel.java
parent5f123e6ad6603c83e6f32ccdcdb0576c647bc2df (diff)
MSIM: Fix to show PUK view when two sims locked on PIN.
Currently when both sims are locked on PIN, upon exhausting PIN attempts for SIM1 PIN, SIM1 PUK view is not displayed and the user is not able to unlock the PUK. This is due to while fetching the getSecurityMode in Key -GuardSecurityModel, the ordering of checking the security mode is PIN first and PUK later.So when one sim is locked on PUK and the other is locked on PIN the ordering of checking the PIN first is causing to return PIN as security mode in place of PUK. This will lead to PUK lock screen not been shown to user. Fix: In KeyGuardSecurityModel.java, while querying the security Mode modify the order to check for security mode i.e PUK locked state first and then PIN locked state. In KeyGuardSimPinView and KeyGuardSimPukView, check for sim locked on PIN and reset the flags to show the default message. Test: manually test Bug: 34796244 Change-Id: I157959d9eb313b9d3af84f86e1429448a0f7f065
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardSecurityModel.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardSecurityModel.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityModel.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityModel.java
index 7baa57e7dae7..0cb6423008e5 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityModel.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityModel.java
@@ -57,16 +57,16 @@ public class KeyguardSecurityModel {
SecurityMode getSecurityMode(int userId) {
KeyguardUpdateMonitor monitor = KeyguardUpdateMonitor.getInstance(mContext);
- if (SubscriptionManager.isValidSubscriptionId(
- monitor.getNextSubIdForState(IccCardConstants.State.PIN_REQUIRED))) {
- return SecurityMode.SimPin;
- }
-
if (mIsPukScreenAvailable && SubscriptionManager.isValidSubscriptionId(
monitor.getNextSubIdForState(IccCardConstants.State.PUK_REQUIRED))) {
return SecurityMode.SimPuk;
}
+ if (SubscriptionManager.isValidSubscriptionId(
+ monitor.getNextSubIdForState(IccCardConstants.State.PIN_REQUIRED))) {
+ return SecurityMode.SimPin;
+ }
+
final int security = mLockPatternUtils.getActivePasswordQuality(userId);
switch (security) {
case DevicePolicyManager.PASSWORD_QUALITY_NUMERIC: