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

Commit 2b602fb1 authored by Sridhar Dubbaka's avatar Sridhar Dubbaka Committed by Steve Kondik
Browse files

Add change to show Invalid card when erroneous card is inserted.

Add change to show "Invalid card" on UI on CARD_IO_ERROR when
erroneous SIM card is inserted

Change-Id: I94c52ff462c999cdb8dbe742fa0bd3f1019ce335
CRs-Fixed: 715101
parent 0dce8331
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -48,6 +48,9 @@
         to unlock the keyguard.  Displayed in one line in a large font.  -->
    <string name="keyguard_password_wrong_pin_code">Incorrect PIN code.</string>

    <!-- Shown in the lock screen when there is SIM card IO error. -->
    <string name="lockscreen_sim_error_message_short">Invalid Card.</string>

    <!-- Instructions telling the user how to unlock the phone. -->
    <string name="keyguard_label_text">To unlock, press Menu then 0.</string>

+9 −1
Original line number Diff line number Diff line
@@ -111,7 +111,8 @@ public class CarrierText extends LinearLayout {
        SimPukLocked, // SIM card is PUK locked because SIM entered wrong too many times
        SimLocked, // SIM card is currently locked
        SimPermDisabled, // SIM card is permanently disabled due to PUK unlock failure
        SimNotReady; // SIM is not ready yet. May never be on devices w/o a SIM.
        SimNotReady, // SIM is not ready yet. May never be on devices w/o a SIM.
        SimIoError; //The sim card is faulty
    }

    public CarrierText(Context context) {
@@ -248,6 +249,11 @@ public class CarrierText extends LinearLayout {
                        getContext().getText(R.string.keyguard_sim_puk_locked_message),
                        plmn);
                break;
            case SimIoError:
                carrierText = makeCarrierStringOnEmergencyCapable(
                        getContext().getText(R.string.lockscreen_sim_error_message_short),
                        plmn);
                break;
        }

        if (DEBUG) Log.d(TAG, "getCarrierTextForSimState: carrierText=" + carrierText);
@@ -298,6 +304,8 @@ public class CarrierText extends LinearLayout {
                return StatusMode.SimPermDisabled;
            case UNKNOWN:
                return StatusMode.SimMissing;
            case CARD_IO_ERROR:
                return StatusMode.SimIoError;
        }
        return StatusMode.SimMissing;
    }
+2 −0
Original line number Diff line number Diff line
@@ -561,6 +561,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
                } else {
                    state = IccCardConstants.State.UNKNOWN;
                }
            } else if (IccCardConstants.INTENT_VALUE_ICC_CARD_IO_ERROR.equals(stateExtra)) {
                state = IccCardConstants.State.CARD_IO_ERROR;
            } else if (IccCardConstants.INTENT_VALUE_ICC_LOADED.equals(stateExtra)
                        || IccCardConstants.INTENT_VALUE_ICC_IMSI.equals(stateExtra)) {
                // This is required because telephony doesn't return to "READY" after