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

Commit 887b3242 authored by Sridhar Dubbaka's avatar Sridhar Dubbaka Committed by Linux Build Service Account
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
parent 4dda7bbd
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>

    <!-- When the lock screen is showing, the phone is plugged in and the battery is fully
         charged, say that it is charged. -->
    <string name="keyguard_charged">Charged</string>
+9 −1
Original line number Diff line number Diff line
@@ -77,7 +77,8 @@ public class CarrierText extends TextView {
        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) {
@@ -270,6 +271,11 @@ public class CarrierText extends TextView {
                        getContext().getText(R.string.keyguard_sim_puk_locked_message),
                        text);
                break;
            case SimIoError:
                carrierText = makeCarrierStringOnEmergencyCapable(
                        getContext().getText(R.string.lockscreen_sim_error_message_short),
                        text);
                break;
        }

        return carrierText;
@@ -319,6 +325,8 @@ public class CarrierText extends TextView {
                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
@@ -702,6 +702,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
                }
            } else if (IccCardConstants.INTENT_VALUE_LOCKED_NETWORK.equals(stateExtra)) {
                state = IccCardConstants.State.NETWORK_LOCKED;
            } 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