summaryrefslogtreecommitdiffstats
path: root/telephony/java
diff options
context:
space:
mode:
Diffstat (limited to 'telephony/java')
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index aaee99f..50bbb1e 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -1414,6 +1414,9 @@ public class TelephonyManager {
// FIXME the argument to pass is subId ??
public int getSimState(int slotId) {
long[] subId = SubscriptionManager.getSubId(slotId);
+ if (subId == null) {
+ return SIM_STATE_ABSENT;
+ }
// FIXME Do not use a property to determine SIM_STATE, call
// appropriate method on some object.
String prop =