From dfe767023e5418e0189834990e9d941eb9cc0bc4 Mon Sep 17 00:00:00 2001 From: Parthasarathy Tarun Date: Fri, 1 Oct 2021 11:34:18 +0530 Subject: [PATCH] Device asks for PUK code instead of SIM PIN A PIN locked SIM card gets "Incorrect SIM PIN code. Enter PUK code..". The value of mRemainingAttempts is always 0, so the actual remaining PIN attempts times was not queried in KeyguardSimPinViewController#showDefaultMessage. Test: Manual Bug: TBA Change-Id: Ib4dd6be15a96b33a4d5e65c25d9589a0bae639d0 --- .../src/com/android/keyguard/KeyguardSimPinViewController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java index a16f304756547..8658c64e79931 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java @@ -52,7 +52,7 @@ public class KeyguardSimPinViewController private ProgressDialog mSimUnlockProgressDialog; private CheckSimPin mCheckSimPinThread; - private int mRemainingAttempts; + private int mRemainingAttempts = -1; // Below flag is set to true during power-up or when a new SIM card inserted on device. // When this is true and when SIM card is PIN locked state, on PIN lock screen, message would // be displayed to inform user about the number of remaining PIN attempts left.