summaryrefslogtreecommitdiff
path: root/telephony/java/android
diff options
context:
space:
mode:
author Naveen Kalla <nkalla@quicinc.com> 2011-12-29 15:07:41 -0800
committer Wink Saville <wink@google.com> 2011-12-29 15:08:20 -0800
commitfc2cbe9b46ab17a401dc50f8e0dbb677ed012299 (patch)
tree345261a8e3de3aab3c98b054227c3d08d7946f5a /telephony/java/android
parentcbc46d145a799121424f677b62a0d438feb4f911 (diff)
Separate SIM states from Radio states
Radio state reflects the state of the modem. SIM_READY, RUIM_READY, NV_READY are subscription states and it is possible that the new cards have multiple subscriptions. Remove the SIM states from Radio State and introduce a new VOICE_RADIO_TECH message to identify the exact voice technology. SIM states will continue to be identified from the SIM_STATUS messages. Change-Id: Ia67d54f43b6c3340d9cf5c27fcb6f7ef49ef4d40
Diffstat (limited to 'telephony/java/android')
-rw-r--r--telephony/java/android/telephony/ServiceState.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java
index 2f010e57b161..32a6975ed1cb 100644
--- a/telephony/java/android/telephony/ServiceState.java
+++ b/telephony/java/android/telephony/ServiceState.java
@@ -97,6 +97,11 @@ public class ServiceState implements Parcelable {
public static final int RADIO_TECHNOLOGY_LTE = 14;
/** @hide */
public static final int RADIO_TECHNOLOGY_HSPAP = 15;
+ /**
+ * GSM radio technology only supports voice. It does not support data.
+ * @hide
+ */
+ public static final int RADIO_TECHNOLOGY_GSM = 16;
/**
* Available registration states for GSM, UMTS and CDMA.
@@ -447,6 +452,9 @@ public class ServiceState implements Parcelable {
case 15:
rtString = "HSPAP";
break;
+ case 16:
+ rtString = "GSM";
+ break;
default:
rtString = "Unexpected";
Log.w(LOG_TAG, "Unexpected radioTechnology=" + rt);
@@ -654,4 +662,28 @@ public class ServiceState implements Parcelable {
public int getSystemId() {
return this.mSystemId;
}
+
+ /** @hide */
+ public static boolean isGsm(int radioTechnology) {
+ return radioTechnology == RADIO_TECHNOLOGY_GPRS
+ || radioTechnology == RADIO_TECHNOLOGY_EDGE
+ || radioTechnology == RADIO_TECHNOLOGY_UMTS
+ || radioTechnology == RADIO_TECHNOLOGY_HSDPA
+ || radioTechnology == RADIO_TECHNOLOGY_HSUPA
+ || radioTechnology == RADIO_TECHNOLOGY_HSPA
+ || radioTechnology == RADIO_TECHNOLOGY_LTE
+ || radioTechnology == RADIO_TECHNOLOGY_HSPAP
+ || radioTechnology == RADIO_TECHNOLOGY_GSM;
+ }
+
+ /** @hide */
+ public static boolean isCdma(int radioTechnology) {
+ return radioTechnology == RADIO_TECHNOLOGY_IS95A
+ || radioTechnology == RADIO_TECHNOLOGY_IS95B
+ || radioTechnology == RADIO_TECHNOLOGY_1xRTT
+ || radioTechnology == RADIO_TECHNOLOGY_EVDO_0
+ || radioTechnology == RADIO_TECHNOLOGY_EVDO_A
+ || radioTechnology == RADIO_TECHNOLOGY_EVDO_B
+ || radioTechnology == RADIO_TECHNOLOGY_EHRPD;
+ }
}