diff options
author | Sandeep Kunta <skunta@codeaurora.org> | 2013-08-10 20:55:38 +0530 |
---|---|---|
committer | Wink Saville <wink@google.com> | 2014-05-01 17:53:42 +0000 |
commit | 10731a6140ad9e1be895406206ced1db7b6d85cd (patch) | |
tree | ef36c176f6c8a787da02b9c99059b58a4e9136b4 /telephony/java/android | |
parent | ab3977d21161815c130bdedf21e2571382d208da (diff) | |
download | frameworks_base-10731a6140ad9e1be895406206ced1db7b6d85cd.zip frameworks_base-10731a6140ad9e1be895406206ced1db7b6d85cd.tar.gz frameworks_base-10731a6140ad9e1be895406206ced1db7b6d85cd.tar.bz2 |
Add support for NETWORK_TYPE_GSM
Add support for NETWORK_TYPE_GSM in TelephonyManager and
corresponding mapping in ServicState.java so that when
application queries for getVoiceNetworkType() and currently
camped rat is GSM, they get network mode as GSM instead
of network mode unknown.
Change-Id: Ibe4672b04a5044710d63499c4cf2b6ebe91444bf
Diffstat (limited to 'telephony/java/android')
-rw-r--r-- | telephony/java/android/telephony/ServiceState.java | 2 | ||||
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java index 606fcb4..1ee390f 100644 --- a/telephony/java/android/telephony/ServiceState.java +++ b/telephony/java/android/telephony/ServiceState.java @@ -797,6 +797,8 @@ public class ServiceState implements Parcelable { return TelephonyManager.NETWORK_TYPE_LTE; case ServiceState.RIL_RADIO_TECHNOLOGY_HSPAP: return TelephonyManager.NETWORK_TYPE_HSPAP; + case ServiceState.RIL_RADIO_TECHNOLOGY_GSM: + return TelephonyManager.NETWORK_TYPE_GSM; default: return TelephonyManager.NETWORK_TYPE_UNKNOWN; } diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 35d63c0..612f327 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -872,6 +872,8 @@ public class TelephonyManager { public static final int NETWORK_TYPE_EHRPD = 14; /** Current network is HSPA+ */ public static final int NETWORK_TYPE_HSPAP = 15; + /** Current network is GSM {@hide} */ + public static final int NETWORK_TYPE_GSM = 16; /** * @return the NETWORK_TYPE_xxxx for current data connection. @@ -963,6 +965,7 @@ public class TelephonyManager { public static int getNetworkClass(int networkType) { switch (networkType) { case NETWORK_TYPE_GPRS: + case NETWORK_TYPE_GSM: case NETWORK_TYPE_EDGE: case NETWORK_TYPE_CDMA: case NETWORK_TYPE_1xRTT: @@ -1029,6 +1032,8 @@ public class TelephonyManager { return "iDEN"; case NETWORK_TYPE_HSPAP: return "HSPA+"; + case NETWORK_TYPE_GSM: + return "GSM"; default: return "UNKNOWN"; } |