diff options
author | Wink Saville <wink@google.com> | 2014-12-19 18:03:40 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-12-19 18:03:40 +0000 |
commit | aa40537ca56ce386edcdaed2d21a9e2f07975812 (patch) | |
tree | a9460054aedbd5e027e64fe4cc28ae7727179d30 | |
parent | 05fce092aa2b6a7f4a8cf4b0f33f7c003eb228f3 (diff) | |
parent | 63c79ce4bfef7e8de7939be3de8a539938d9fc4e (diff) | |
download | frameworks_base-aa40537ca56ce386edcdaed2d21a9e2f07975812.zip frameworks_base-aa40537ca56ce386edcdaed2d21a9e2f07975812.tar.gz frameworks_base-aa40537ca56ce386edcdaed2d21a9e2f07975812.tar.bz2 |
am 63c79ce4: Merge "Update mapping between RAF and Network Type." into lmp-mr1-dev
* commit '63c79ce4bfef7e8de7939be3de8a539938d9fc4e':
Update mapping between RAF and Network Type.
-rw-r--r-- | telephony/java/android/telephony/RadioAccessFamily.java | 29 |
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; } |