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

Commit c6426825 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Show carrier name on pin lock screen"

parents 67af9085 50df58d0
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -99,13 +99,7 @@ public class KeyguardSimPinView extends KeyguardPinBasedInputView {
        esimButton.setVisibility(isEsimLocked ? View.VISIBLE : View.GONE);
    }

    private void showDefaultMessage() {
        if (mRemainingAttempts >= 0) {
            mSecurityMessageDisplay.setMessage(getPinPasswordErrorMessage(
                    mRemainingAttempts, true));
            return;
        }

    private void setLockedSimMessage() {
        boolean isEsimLocked = KeyguardEsimArea.isEsimLocked(mContext, mSubId);
        int count = TelephonyManager.getDefault().getSimCount();
        Resources rez = getResources();
@@ -122,13 +116,20 @@ public class KeyguardSimPinView extends KeyguardPinBasedInputView {
                color = info.getIconTint();
            }
        }

        if (isEsimLocked) {
            msg = rez.getString(R.string.kg_sim_lock_esim_instructions, msg);
        }

        mSecurityMessageDisplay.setMessage(msg);
        mSimImageView.setImageTintList(ColorStateList.valueOf(color));
    }

    private void showDefaultMessage() {
        setLockedSimMessage();
        if (mRemainingAttempts >= 0) {
            return;
        }


        // Sending empty PIN here to query the number of remaining PIN attempts
        new CheckSimPin("", mSubId) {
@@ -137,8 +138,7 @@ public class KeyguardSimPinView extends KeyguardPinBasedInputView {
                        " attemptsRemaining=" + attemptsRemaining);
                if (attemptsRemaining >= 0) {
                    mRemainingAttempts = attemptsRemaining;
                    mSecurityMessageDisplay.setMessage(
                            getPinPasswordErrorMessage(attemptsRemaining, true));
                    setLockedSimMessage();
                }
            }
        }.start();