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

Commit fc70d660 authored by Ravindra's avatar Ravindra
Browse files

Telephony: Reset of security message

When number of attempts remaining for an incorrect PIN code
is greater than 2 the security message to be displayed will
be overwritten by the default reset message.Avoid overwriting
the security message which displays the number of attempts
remaining.

Change-Id: I5eb59ecab56b1f3ce79b3cdb646d8ca0a944b492
CRs-Fixed: 619902
parent 22f95644
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ public class KeyguardSimPinView extends KeyguardAbsKeyInputView

    protected ProgressDialog mSimUnlockProgressDialog = null;
    private CheckSimPin mCheckSimPinThread;

    protected boolean mShowDefaultMessage = true;
    protected AlertDialog mRemainingAttemptsDialog;
    public KeyguardSimPinView(Context context) {
        this(context, null);
@@ -75,7 +75,9 @@ public class KeyguardSimPinView extends KeyguardAbsKeyInputView
    }

    public void resetState() {
        if (mShowDefaultMessage) {
            mSecurityMessageDisplay.setMessage(R.string.kg_sim_pin_instructions, true);
        }
        mPasswordEntry.setEnabled(true);
    }

@@ -262,6 +264,7 @@ public class KeyguardSimPinView extends KeyguardAbsKeyInputView
                                KeyguardUpdateMonitor.getInstance(getContext()).reportSimUnlocked();
                                mCallback.dismiss(true);
                            } else {
                                mShowDefaultMessage = false;
                                if (result == PhoneConstants.PIN_PASSWORD_INCORRECT) {
                                    if (attemptsRemaining <= 2) {
                                        // this is getting critical - show dialog
+5 −2
Original line number Diff line number Diff line
@@ -140,8 +140,10 @@ public class MSimKeyguardSimPinView extends KeyguardSimPinView {
    }

    public void resetState() {
        if (mShowDefaultMessage) {
            mSecurityMessageDisplay.setMessage(
                    getSecurityMessageDisplay(R.string.kg_sim_pin_instructions), true);
        }
        mPasswordEntry.setEnabled(true);
    }

@@ -231,6 +233,7 @@ public class MSimKeyguardSimPinView extends KeyguardSimPinView {
                                // so it knows right away.
                                closeKeyGuard(true);
                            } else {
                                mShowDefaultMessage = false;
                                if (result == PhoneConstants.PIN_PASSWORD_INCORRECT) {
                                    if (attemptsRemaining <= 2) {
                                        // this is getting critical - show dialog