summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorWink Saville <wink@google.com>2014-12-19 18:09:26 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-19 18:09:26 +0000
commit7b727e2e0aedef50aba8e3d4081a643b79329497 (patch)
tree1ab5011a466594055868b7fbe7d4320021898650 /telephony
parentb4185370d22457e8893ab5da07870e6d56910fbe (diff)
parentaa40537ca56ce386edcdaed2d21a9e2f07975812 (diff)
downloadframeworks_base-7b727e2e0aedef50aba8e3d4081a643b79329497.zip
frameworks_base-7b727e2e0aedef50aba8e3d4081a643b79329497.tar.gz
frameworks_base-7b727e2e0aedef50aba8e3d4081a643b79329497.tar.bz2
am aa40537c: am 63c79ce4: Merge "Update mapping between RAF and Network Type." into lmp-mr1-dev
* commit 'aa40537ca56ce386edcdaed2d21a9e2f07975812': Update mapping between RAF and Network Type.
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/android/telephony/RadioAccessFamily.java29
1 files changed, 26 insertions, 3 deletions
diff --git a/telephony/java/android/telephony/RadioAccessFamily.java b/telephony/java/android/telephony/RadioAccessFamily.java
index 734fc68..0820bfa 100644
--- a/telephony/java/android/telephony/RadioAccessFamily.java
+++ b/telephony/java/android/telephony/RadioAccessFamily.java
@@ -136,13 +136,36 @@ public class RadioAccessFamily implements Parcelable {
};
public static int getRafFromNetworkType(int type) {
- // TODO map from RILConstants.NETWORK_TYPE_* to RAF_*
switch (type) {
case RILConstants.NETWORK_MODE_WCDMA_PREF:
- case RILConstants.NETWORK_MODE_GSM_UMTS:
- return RAF_UMTS | RAF_GSM;
+ return RAF_GSM | RAF_UMTS | RAF_HSUPA | RAF_HSDPA | RAF_HSPA | RAF_HSPAP;
case RILConstants.NETWORK_MODE_GSM_ONLY:
return RAF_GSM;
+ case RILConstants.NETWORK_MODE_WCDMA_ONLY:
+ return RAF_UMTS | RAF_HSUPA | RAF_HSDPA | RAF_HSPA | RAF_HSPAP;
+ case RILConstants.NETWORK_MODE_GSM_UMTS:
+ return RAF_GSM | RAF_UMTS | RAF_HSUPA | RAF_HSDPA | RAF_HSPA | RAF_HSPAP;
+ case RILConstants.NETWORK_MODE_CDMA:
+ return RAF_EVDO_0 | RAF_EVDO_A | RAF_EVDO_B | RAF_IS95A | RAF_IS95B | RAF_1xRTT;
+ case RILConstants.NETWORK_MODE_LTE_CDMA_EVDO:
+ return RAF_EVDO_0 | RAF_EVDO_A | RAF_EVDO_B | RAF_IS95A | RAF_IS95B | RAF_1xRTT
+ | RAF_EHRPD;
+ case RILConstants.NETWORK_MODE_LTE_GSM_WCDMA:
+ return RAF_GSM | RAF_UMTS | RAF_LTE | RAF_HSUPA | RAF_HSDPA | RAF_HSPA | RAF_HSPAP;
+ case RILConstants.NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA:
+ return RAF_GSM | RAF_UMTS | RAF_LTE | RAF_EVDO_0 | RAF_EVDO_A | RAF_EVDO_B
+ | RAF_IS95A | RAF_IS95B | RAF_1xRTT | RAF_EHRPD | RAF_HSUPA | RAF_HSDPA
+ | RAF_HSPA | RAF_HSPAP;
+ case RILConstants.NETWORK_MODE_LTE_ONLY:
+ return RAF_LTE;
+ case RILConstants.NETWORK_MODE_LTE_WCDMA:
+ return RAF_LTE | RAF_UMTS | RAF_HSUPA | RAF_HSDPA | RAF_HSPA | RAF_HSPAP;
+ case RILConstants.NETWORK_MODE_CDMA_NO_EVDO:
+ return RAF_UNKNOWN;
+ case RILConstants.NETWORK_MODE_EVDO_NO_CDMA:
+ return RAF_UNKNOWN;
+ case RILConstants.NETWORK_MODE_GLOBAL:
+ return RAF_UNKNOWN;
default:
return RAF_UNKNOWN;
}