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

Commit 1766974b authored by John Wang's avatar John Wang Committed by Android Git Automerger
Browse files

am 03cbb58e: am ff42c04d: Merge "Support SIM permanently disabled state." into honeycomb-LTE

* commit '03cbb58e':
  Support SIM permanently disabled state.
parents 19f913a8 03cbb58e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1790,6 +1790,9 @@
    <string name="lockscreen_missing_sim_instructions">Please insert a SIM card.</string>
    <!-- Shown in the lock screen to ask the user to insert a SIM card when sim is missing or not readable. -->
    <string name="lockscreen_missing_sim_instructions_long">The SIM card is missing or not readable. Please insert a SIM card.</string>
    <!-- Shown in the lock screen to inform the user to SIM card is permanently disabled. -->
    <string name="lockscreen_permanent_disabled_sim_instructions">Your SIM card is permanently disabled.\n
    Please contact your wireless service provider to obtain another SIM card.</string>

    <!-- Shown in the lock screen when there is emergency calls only mode. -->
    <string name="emergency_calls_only" msgid="2485604591272668370">Emergency calls only</string>
+9 −1
Original line number Diff line number Diff line
@@ -114,7 +114,15 @@ public class KeyguardUpdateMonitor {
            }
            String stateExtra = intent.getStringExtra(IccCard.INTENT_KEY_ICC_STATE);
            if (IccCard.INTENT_VALUE_ICC_ABSENT.equals(stateExtra)) {
                final String absentReason = intent
                    .getStringExtra(IccCard.INTENT_KEY_LOCKED_REASON);

                if (IccCard.INTENT_VALUE_ABSENT_ON_PERM_DISABLED.equals(
                        absentReason)) {
                    this.simState = IccCard.State.PERM_DISABLED;
                } else {
                    this.simState = IccCard.State.ABSENT;
                }
            } else if (IccCard.INTENT_VALUE_ICC_READY.equals(stateExtra)) {
                this.simState = IccCard.State.READY;
            } else if (IccCard.INTENT_VALUE_ICC_LOCKED.equals(stateExtra)) {
+8 −3
Original line number Diff line number Diff line
@@ -580,7 +580,9 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
            final boolean provisioned = mUpdateMonitor.isDeviceProvisioned();
            final IccCard.State state = mUpdateMonitor.getSimState();
            final boolean lockedOrMissing = state.isPinLocked()
                    || ((state == IccCard.State.ABSENT) && requireSim);
                    || ((state == IccCard.State.ABSENT
                            || state == IccCard.State.PERM_DISABLED)
                            && requireSim);

            if (!lockedOrMissing && !provisioned) {
                if (DEBUG) Log.d(TAG, "doKeyguard: not showing because device isn't provisioned"
@@ -687,12 +689,15 @@ public class KeyguardViewMediator implements KeyguardViewCallback,

        switch (simState) {
            case ABSENT:
            case PERM_DISABLED:
                // only force lock screen in case of missing sim if user hasn't
                // gone through setup wizard
                if (!mUpdateMonitor.isDeviceProvisioned()) {
                    if (!isShowing()) {
                        if (DEBUG) Log.d(TAG, "INTENT_VALUE_ICC_ABSENT and keygaurd isn't showing, we need "
                             + "to show the keyguard since the device isn't provisioned yet.");
                        if (DEBUG) Log.d(TAG, "INTENT_VALUE_ICC_ABSENT "
                                + "or PERM_DISABLED and keygaurd isn't showing,"
                                + " we need to show the keyguard since the "
                                + "device isn't provisioned yet.");
                        doKeyguard();
                    } else {
                        resetStateLocked();
+2 −1
Original line number Diff line number Diff line
@@ -181,7 +181,8 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
    private boolean stuckOnLockScreenBecauseSimMissing() {
        return mRequiresSim
                && (!mUpdateMonitor.isDeviceProvisioned())
                && (mUpdateMonitor.getSimState() == IccCard.State.ABSENT);
                && (mUpdateMonitor.getSimState() == IccCard.State.ABSENT ||
                    mUpdateMonitor.getSimState() == IccCard.State.PERM_DISABLED);
    }

    /**
+4 −2
Original line number Diff line number Diff line
@@ -55,8 +55,10 @@ public class LockPatternKeyguardViewProperties implements KeyguardViewProperties

    private boolean isSimPinSecure() {
        final IccCard.State simState = mUpdateMonitor.getSimState();
        return (simState == IccCard.State.PIN_REQUIRED || simState == IccCard.State.PUK_REQUIRED
            || simState == IccCard.State.ABSENT);
        return (simState == IccCard.State.PIN_REQUIRED
                || simState == IccCard.State.PUK_REQUIRED
                || simState == IccCard.State.ABSENT
                || simState == IccCard.State.PERM_DISABLED);
    }

}
Loading