Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -168,6 +168,9 @@ public class PhoneStatusBarPolicy { if (IccCardConstants.INTENT_VALUE_ICC_ABSENT.equals(stateExtra)) { if (IccCardConstants.INTENT_VALUE_ICC_ABSENT.equals(stateExtra)) { mSimState = IccCardConstants.State.ABSENT; mSimState = IccCardConstants.State.ABSENT; } } else if (IccCardConstants.INTENT_VALUE_ICC_CARD_IO_ERROR.equals(stateExtra)) { mSimState = IccCardConstants.State.CARD_IO_ERROR; } else if (IccCardConstants.INTENT_VALUE_ICC_READY.equals(stateExtra)) { else if (IccCardConstants.INTENT_VALUE_ICC_READY.equals(stateExtra)) { mSimState = IccCardConstants.State.READY; mSimState = IccCardConstants.State.READY; } } Loading telephony/java/android/telephony/TelephonyManager.java +8 −0 Original line number Original line Diff line number Diff line Loading @@ -1055,6 +1055,10 @@ public class TelephonyManager { public static final int SIM_STATE_NETWORK_LOCKED = 4; public static final int SIM_STATE_NETWORK_LOCKED = 4; /** SIM card state: Ready */ /** SIM card state: Ready */ public static final int SIM_STATE_READY = 5; public static final int SIM_STATE_READY = 5; /** SIM card state: SIM Card Error, Sim Card is present but faulty *@hide */ public static final int SIM_STATE_CARD_IO_ERROR = 6; /** /** * @return true if a ICC card is present * @return true if a ICC card is present Loading @@ -1081,6 +1085,7 @@ public class TelephonyManager { * @see #SIM_STATE_PUK_REQUIRED * @see #SIM_STATE_PUK_REQUIRED * @see #SIM_STATE_NETWORK_LOCKED * @see #SIM_STATE_NETWORK_LOCKED * @see #SIM_STATE_READY * @see #SIM_STATE_READY * @see #SIM_STATE_CARD_IO_ERROR */ */ public int getSimState() { public int getSimState() { String prop = SystemProperties.get(TelephonyProperties.PROPERTY_SIM_STATE); String prop = SystemProperties.get(TelephonyProperties.PROPERTY_SIM_STATE); Loading @@ -1099,6 +1104,9 @@ public class TelephonyManager { else if ("READY".equals(prop)) { else if ("READY".equals(prop)) { return SIM_STATE_READY; return SIM_STATE_READY; } } else if ("CARD_IO_ERROR".equals(prop)) { return SIM_STATE_CARD_IO_ERROR; } else { else { return SIM_STATE_UNKNOWN; return SIM_STATE_UNKNOWN; } } Loading telephony/java/com/android/internal/telephony/IccCardConstants.java +5 −2 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,8 @@ public class IccCardConstants { public static final String INTENT_VALUE_ICC_NOT_READY = "NOT_READY"; public static final String INTENT_VALUE_ICC_NOT_READY = "NOT_READY"; /* ABSENT means ICC is missing */ /* ABSENT means ICC is missing */ public static final String INTENT_VALUE_ICC_ABSENT = "ABSENT"; public static final String INTENT_VALUE_ICC_ABSENT = "ABSENT"; /* CARD_IO_ERROR means for three consecutive times there was SIM IO error */ static public final String INTENT_VALUE_ICC_CARD_IO_ERROR = "CARD_IO_ERROR"; /* LOCKED means ICC is locked by pin or by network */ /* LOCKED means ICC is locked by pin or by network */ public static final String INTENT_VALUE_ICC_LOCKED = "LOCKED"; public static final String INTENT_VALUE_ICC_LOCKED = "LOCKED"; /* READY means ICC is ready to access */ /* READY means ICC is ready to access */ Loading Loading @@ -63,7 +65,8 @@ public class IccCardConstants { NETWORK_LOCKED, NETWORK_LOCKED, READY, READY, NOT_READY, NOT_READY, PERM_DISABLED; PERM_DISABLED, CARD_IO_ERROR; public boolean isPinLocked() { public boolean isPinLocked() { return ((this == PIN_REQUIRED) || (this == PUK_REQUIRED)); return ((this == PIN_REQUIRED) || (this == PUK_REQUIRED)); Loading @@ -72,7 +75,7 @@ public class IccCardConstants { public boolean iccCardExist() { public boolean iccCardExist() { return ((this == PIN_REQUIRED) || (this == PUK_REQUIRED) return ((this == PIN_REQUIRED) || (this == PUK_REQUIRED) || (this == NETWORK_LOCKED) || (this == READY) || (this == NETWORK_LOCKED) || (this == READY) || (this == PERM_DISABLED)); || (this == PERM_DISABLED) || (this == CARD_IO_ERROR)); } } } } } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -168,6 +168,9 @@ public class PhoneStatusBarPolicy { if (IccCardConstants.INTENT_VALUE_ICC_ABSENT.equals(stateExtra)) { if (IccCardConstants.INTENT_VALUE_ICC_ABSENT.equals(stateExtra)) { mSimState = IccCardConstants.State.ABSENT; mSimState = IccCardConstants.State.ABSENT; } } else if (IccCardConstants.INTENT_VALUE_ICC_CARD_IO_ERROR.equals(stateExtra)) { mSimState = IccCardConstants.State.CARD_IO_ERROR; } else if (IccCardConstants.INTENT_VALUE_ICC_READY.equals(stateExtra)) { else if (IccCardConstants.INTENT_VALUE_ICC_READY.equals(stateExtra)) { mSimState = IccCardConstants.State.READY; mSimState = IccCardConstants.State.READY; } } Loading
telephony/java/android/telephony/TelephonyManager.java +8 −0 Original line number Original line Diff line number Diff line Loading @@ -1055,6 +1055,10 @@ public class TelephonyManager { public static final int SIM_STATE_NETWORK_LOCKED = 4; public static final int SIM_STATE_NETWORK_LOCKED = 4; /** SIM card state: Ready */ /** SIM card state: Ready */ public static final int SIM_STATE_READY = 5; public static final int SIM_STATE_READY = 5; /** SIM card state: SIM Card Error, Sim Card is present but faulty *@hide */ public static final int SIM_STATE_CARD_IO_ERROR = 6; /** /** * @return true if a ICC card is present * @return true if a ICC card is present Loading @@ -1081,6 +1085,7 @@ public class TelephonyManager { * @see #SIM_STATE_PUK_REQUIRED * @see #SIM_STATE_PUK_REQUIRED * @see #SIM_STATE_NETWORK_LOCKED * @see #SIM_STATE_NETWORK_LOCKED * @see #SIM_STATE_READY * @see #SIM_STATE_READY * @see #SIM_STATE_CARD_IO_ERROR */ */ public int getSimState() { public int getSimState() { String prop = SystemProperties.get(TelephonyProperties.PROPERTY_SIM_STATE); String prop = SystemProperties.get(TelephonyProperties.PROPERTY_SIM_STATE); Loading @@ -1099,6 +1104,9 @@ public class TelephonyManager { else if ("READY".equals(prop)) { else if ("READY".equals(prop)) { return SIM_STATE_READY; return SIM_STATE_READY; } } else if ("CARD_IO_ERROR".equals(prop)) { return SIM_STATE_CARD_IO_ERROR; } else { else { return SIM_STATE_UNKNOWN; return SIM_STATE_UNKNOWN; } } Loading
telephony/java/com/android/internal/telephony/IccCardConstants.java +5 −2 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,8 @@ public class IccCardConstants { public static final String INTENT_VALUE_ICC_NOT_READY = "NOT_READY"; public static final String INTENT_VALUE_ICC_NOT_READY = "NOT_READY"; /* ABSENT means ICC is missing */ /* ABSENT means ICC is missing */ public static final String INTENT_VALUE_ICC_ABSENT = "ABSENT"; public static final String INTENT_VALUE_ICC_ABSENT = "ABSENT"; /* CARD_IO_ERROR means for three consecutive times there was SIM IO error */ static public final String INTENT_VALUE_ICC_CARD_IO_ERROR = "CARD_IO_ERROR"; /* LOCKED means ICC is locked by pin or by network */ /* LOCKED means ICC is locked by pin or by network */ public static final String INTENT_VALUE_ICC_LOCKED = "LOCKED"; public static final String INTENT_VALUE_ICC_LOCKED = "LOCKED"; /* READY means ICC is ready to access */ /* READY means ICC is ready to access */ Loading Loading @@ -63,7 +65,8 @@ public class IccCardConstants { NETWORK_LOCKED, NETWORK_LOCKED, READY, READY, NOT_READY, NOT_READY, PERM_DISABLED; PERM_DISABLED, CARD_IO_ERROR; public boolean isPinLocked() { public boolean isPinLocked() { return ((this == PIN_REQUIRED) || (this == PUK_REQUIRED)); return ((this == PIN_REQUIRED) || (this == PUK_REQUIRED)); Loading @@ -72,7 +75,7 @@ public class IccCardConstants { public boolean iccCardExist() { public boolean iccCardExist() { return ((this == PIN_REQUIRED) || (this == PUK_REQUIRED) return ((this == PIN_REQUIRED) || (this == PUK_REQUIRED) || (this == NETWORK_LOCKED) || (this == READY) || (this == NETWORK_LOCKED) || (this == READY) || (this == PERM_DISABLED)); || (this == PERM_DISABLED) || (this == CARD_IO_ERROR)); } } } } } }