From f099a5f389a43a1a1f0abc6577e45c7dfca14c5c Mon Sep 17 00:00:00 2001 From: Rakesh Pallerla Date: Wed, 6 Feb 2013 11:44:23 +0530 Subject: 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 --- telephony/java/android/telephony/TelephonyManager.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'telephony/java/android') 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; } -- cgit v1.1