diff options
Diffstat (limited to 'telephony/java/com')
3 files changed, 26 insertions, 1 deletions
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index d83b135..cac4de9 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -243,5 +243,9 @@ interface ITelephony { */ int getVoiceMessageCount(); + /** + * Returns the network type + */ + int getNetworkType(); } diff --git a/telephony/java/com/android/internal/telephony/ServiceStateTracker.java b/telephony/java/com/android/internal/telephony/ServiceStateTracker.java index 39806e9..c74bb8d 100644 --- a/telephony/java/com/android/internal/telephony/ServiceStateTracker.java +++ b/telephony/java/com/android/internal/telephony/ServiceStateTracker.java @@ -34,6 +34,14 @@ public abstract class ServiceStateTracker extends Handler { * 1 = GPRS only * 2 = EDGE * 3 = UMTS + * 4 = IS95A + * 5 = IS95B + * 6 = 1xRTT + * 7 = EvDo_0 + * 8 = EvDo_A + * 9 = HSDPA + * 10 = HSUPA + * 11 = HSPA */ protected static final int DATA_ACCESS_UNKNOWN = 0; protected static final int DATA_ACCESS_GPRS = 1; @@ -44,6 +52,9 @@ public abstract class ServiceStateTracker extends Handler { protected static final int DATA_ACCESS_CDMA_1xRTT = 6; protected static final int DATA_ACCESS_CDMA_EvDo_0 = 7; protected static final int DATA_ACCESS_CDMA_EvDo_A = 8; + protected static final int DATA_ACCESS_HSDPA = 9; + protected static final int DATA_ACCESS_HSUPA = 10; + protected static final int DATA_ACCESS_HSPA = 11; //***** Instance Variables protected CommandsInterface cm; diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java index 0c040e6..e7406e2 100644 --- a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java +++ b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java @@ -677,6 +677,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker { newGPRSState = regCodeToServiceState(regState); newDataRoaming = regCodeIsRoaming(regState); newNetworkType = type; + newSS.setRadioTechnology(type); break; case EVENT_POLL_STATE_OPERATOR: @@ -810,6 +811,15 @@ final class GsmServiceStateTracker extends ServiceStateTracker { case DATA_ACCESS_UMTS: ret = "UMTS"; break; + case DATA_ACCESS_HSDPA: + ret = "HSDPA"; + break; + case DATA_ACCESS_HSUPA: + ret = "HSUPA"; + break; + case DATA_ACCESS_HSPA: + ret = "HSPA"; + break; default: Log.e(LOG_TAG, "Wrong network type: " + Integer.toString(type)); break; @@ -1288,7 +1298,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker { * that could support voice and data simultaniously. */ boolean isConcurrentVoiceAndData() { - return (networkType == DATA_ACCESS_UMTS); + return (networkType >= DATA_ACCESS_UMTS); } /** |