Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d85e7560 authored by Umashankar Godachi's avatar Umashankar Godachi Committed by Linux Build Service Account
Browse files

Keyguard: Fix to display PUK remaining attempts.

Currently in the base AOSP code, upon entering wrong
PUK code, default message is shown instead of remaining
retry attempts.

Fix: Add a flag to control the display of default message
If user enters wrong PUK code show the remaining retry
attempts by setting show default message flag to false.

Change-Id: Iec39036e851fe5927b7379a0050d91533eee642c
parent d5f4043a
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ public class KeyguardSimPukView extends KeyguardPinBasedInputView {

    private ProgressDialog mSimUnlockProgressDialog = null;
    private CheckSimPuk mCheckSimPukThread;
    private boolean mShowDefaultMessage = true;
    private String mPukText;
    private String mPinText;
    private StateMachine mStateMachine = new StateMachine();
@@ -133,7 +134,10 @@ public class KeyguardSimPukView extends KeyguardPinBasedInputView {
                        color = info.getIconTint();
                    }
                }
                if (mShowDefaultMessage) {
                    mSecurityMessageDisplay.setMessage(msg, true);
                }
                mShowDefaultMessage = true;
                mSimImageView.setImageTintList(ColorStateList.valueOf(color));
            }
            mPasswordEntry.requestFocus();
@@ -328,6 +332,7 @@ public class KeyguardSimPukView extends KeyguardPinBasedInputView {
                                        .reportSimUnlocked(mSubId);
                                mCallback.dismiss(true);
                            } else {
                                mShowDefaultMessage = false;
                                if (result == PhoneConstants.PIN_PASSWORD_INCORRECT) {
                                    if (attemptsRemaining <= 2) {
                                        // this is getting critical - show dialog