summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWink Saville <wink@google.com>2014-12-19 18:27:32 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-19 18:27:32 +0000
commit57859d704ef2bc61798c172c4524596393f0beef (patch)
tree95d2cbe4d832d8ee3183b98667d9988f36596682
parentaa40537ca56ce386edcdaed2d21a9e2f07975812 (diff)
parentf73c2d1f0b6d55668c19493fba0088a69e6b128f (diff)
downloadframeworks_base-57859d704ef2bc61798c172c4524596393f0beef.zip
frameworks_base-57859d704ef2bc61798c172c4524596393f0beef.tar.gz
frameworks_base-57859d704ef2bc61798c172c4524596393f0beef.tar.bz2
am f73c2d1f: Update mapping between RAF and Network Type.
* commit 'f73c2d1f0b6d55668c19493fba0088a69e6b128f': Update mapping between RAF and Network Type.
-rw-r--r--telephony/java/android/telephony/RadioAccessFamily.java53
1 files changed, 36 insertions, 17 deletions
diff --git a/telephony/java/android/telephony/RadioAccessFamily.java b/telephony/java/android/telephony/RadioAccessFamily.java
index 0820bfa..2c0ae8b 100644
--- a/telephony/java/android/telephony/RadioAccessFamily.java
+++ b/telephony/java/android/telephony/RadioAccessFamily.java
@@ -136,38 +136,57 @@ public class RadioAccessFamily implements Parcelable {
};
public static int getRafFromNetworkType(int type) {
+ final int GSM = RAF_GSM | RAF_GPRS | RAF_EDGE;
+ final int HS = RAF_HSUPA | RAF_HSDPA | RAF_HSPA | RAF_HSPAP;
+ final int CDMA = RAF_IS95A | RAF_IS95B | RAF_1xRTT;
+ final int EVDO = RAF_EVDO_0 | RAF_EVDO_A | RAF_EVDO_B;
+ final int WCDMA = HS | RAF_UMTS;
+
+ int raf;
+
switch (type) {
case RILConstants.NETWORK_MODE_WCDMA_PREF:
- return RAF_GSM | RAF_UMTS | RAF_HSUPA | RAF_HSDPA | RAF_HSPA | RAF_HSPAP;
+ raf = GSM | WCDMA;
+ break;
case RILConstants.NETWORK_MODE_GSM_ONLY:
- return RAF_GSM;
+ raf = GSM;
+ break;
case RILConstants.NETWORK_MODE_WCDMA_ONLY:
- return RAF_UMTS | RAF_HSUPA | RAF_HSDPA | RAF_HSPA | RAF_HSPAP;
+ raf = WCDMA;
+ break;
case RILConstants.NETWORK_MODE_GSM_UMTS:
- return RAF_GSM | RAF_UMTS | RAF_HSUPA | RAF_HSDPA | RAF_HSPA | RAF_HSPAP;
+ raf = GSM | WCDMA;
+ break;
case RILConstants.NETWORK_MODE_CDMA:
- return RAF_EVDO_0 | RAF_EVDO_A | RAF_EVDO_B | RAF_IS95A | RAF_IS95B | RAF_1xRTT;
+ raf = CDMA;
+ break;
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;
+ raf = RAF_LTE | CDMA | EVDO;
+ break;
case RILConstants.NETWORK_MODE_LTE_GSM_WCDMA:
- return RAF_GSM | RAF_UMTS | RAF_LTE | RAF_HSUPA | RAF_HSDPA | RAF_HSPA | RAF_HSPAP;
+ raf = RAF_LTE | GSM | WCDMA;
+ break;
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;
+ raf = RAF_LTE | CDMA | EVDO | GSM | WCDMA;
+ break;
case RILConstants.NETWORK_MODE_LTE_ONLY:
- return RAF_LTE;
+ raf = RAF_LTE;
+ break;
case RILConstants.NETWORK_MODE_LTE_WCDMA:
- return RAF_LTE | RAF_UMTS | RAF_HSUPA | RAF_HSDPA | RAF_HSPA | RAF_HSPAP;
+ raf = RAF_LTE | WCDMA;
+ break;
case RILConstants.NETWORK_MODE_CDMA_NO_EVDO:
- return RAF_UNKNOWN;
+ raf = CDMA;
+ break;
case RILConstants.NETWORK_MODE_EVDO_NO_CDMA:
- return RAF_UNKNOWN;
+ raf = EVDO;
+ break;
case RILConstants.NETWORK_MODE_GLOBAL:
- return RAF_UNKNOWN;
+ raf = GSM | WCDMA | CDMA | EVDO;
+ break;
default:
- return RAF_UNKNOWN;
+ raf = RAF_UNKNOWN;
+ break;
}
}
}