diff options
| author | Rakesh Pallerla <rakesh@codeaurora.org> | 2013-02-06 11:44:23 +0530 |
|---|---|---|
| committer | Sandeep Kunta <skunta@codeaurora.org> | 2014-03-12 12:23:41 +0530 |
| commit | f099a5f389a43a1a1f0abc6577e45c7dfca14c5c (patch) | |
| tree | 405444be9ed73ab09ee68a5e1422172c31fb24f7 /telephony/java | |
| parent | 8a927cfa4ea8e4a78f6a9fa1e2b1da9187a3d1e8 (diff) | |
| download | frameworks_base-f099a5f389a43a1a1f0abc6577e45c7dfca14c5c.zip frameworks_base-f099a5f389a43a1a1f0abc6577e45c7dfca14c5c.tar.gz frameworks_base-f099a5f389a43a1a1f0abc6577e45c7dfca14c5c.tar.bz2 | |
Telephony: Add functionality to handle ICC IO error
At present in Android all ICC Card states other than
ICC PRESENT are treated as ICC ABSENT.Adding functionality
to handle ICC IO error card state.
Change-Id: I229bd80cb5e487f4345bef9fb7fee60850f085d9
Bug: 10643652
Diffstat (limited to 'telephony/java')
| -rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 8 | ||||
| -rw-r--r-- | telephony/java/com/android/internal/telephony/IccCardConstants.java | 7 |
2 files changed, 13 insertions, 2 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 8f17e72..f100633 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -794,6 +794,10 @@ public class TelephonyManager { public static final int SIM_STATE_NETWORK_LOCKED = 4; /** SIM card state: Ready */ 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 @@ -820,6 +824,7 @@ public class TelephonyManager { * @see #SIM_STATE_PUK_REQUIRED * @see #SIM_STATE_NETWORK_LOCKED * @see #SIM_STATE_READY + * @see #SIM_STATE_CARD_IO_ERROR */ public int getSimState() { String prop = SystemProperties.get(TelephonyProperties.PROPERTY_SIM_STATE); @@ -838,6 +843,9 @@ public class TelephonyManager { else if ("READY".equals(prop)) { return SIM_STATE_READY; } + else if ("CARD_IO_ERROR".equals(prop)) { + return SIM_STATE_CARD_IO_ERROR; + } else { return SIM_STATE_UNKNOWN; } diff --git a/telephony/java/com/android/internal/telephony/IccCardConstants.java b/telephony/java/com/android/internal/telephony/IccCardConstants.java index 236bb2f..8029713 100644 --- a/telephony/java/com/android/internal/telephony/IccCardConstants.java +++ b/telephony/java/com/android/internal/telephony/IccCardConstants.java @@ -28,6 +28,8 @@ public class IccCardConstants { public static final String INTENT_VALUE_ICC_NOT_READY = "NOT_READY"; /* ABSENT means ICC is missing */ 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 */ public static final String INTENT_VALUE_ICC_LOCKED = "LOCKED"; /* READY means ICC is ready to access */ @@ -63,7 +65,8 @@ public class IccCardConstants { NETWORK_LOCKED, READY, NOT_READY, - PERM_DISABLED; + PERM_DISABLED, + CARD_IO_ERROR; public boolean isPinLocked() { return ((this == PIN_REQUIRED) || (this == PUK_REQUIRED)); @@ -72,7 +75,7 @@ public class IccCardConstants { public boolean iccCardExist() { return ((this == PIN_REQUIRED) || (this == PUK_REQUIRED) || (this == NETWORK_LOCKED) || (this == READY) - || (this == PERM_DISABLED)); + || (this == PERM_DISABLED) || (this == CARD_IO_ERROR)); } } } |
