Skip to content

Commit 0a5174a

Browse files
Naveen KallaWink Saville
authored andcommitted
Add support for EVDO Rev B
Change-Id: I8588e8b342c51f4b79bced8ef8fe60d57f07aefa
1 parent 24440cf commit 0a5174a

File tree

7 files changed

+34
-3
lines changed

7 files changed

+34
-3
lines changed

api/current.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127479,6 +127479,17 @@
127479127479
visibility="public"
127480127480
>
127481127481
</field>
127482+
<field name="NETWORK_TYPE_EVDO_B"
127483+
type="int"
127484+
transient="false"
127485+
volatile="false"
127486+
value="12"
127487+
static="true"
127488+
final="true"
127489+
deprecated="not deprecated"
127490+
visibility="public"
127491+
>
127492+
</field>
127482127493
<field name="NETWORK_TYPE_GPRS"
127483127494
type="int"
127484127495
transient="false"

core/java/android/net/MobileDataStateTracker.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,9 @@ public String getTcpBufferSizesPropName() {
304304
case TelephonyManager.NETWORK_TYPE_EVDO_A:
305305
networkTypeStr = "evdo";
306306
break;
307+
case TelephonyManager.NETWORK_TYPE_EVDO_B:
308+
networkTypeStr = "evdo";
309+
break;
307310
}
308311
return "net.tcp.buffersize." + networkTypeStr;
309312
}

services/java/com/android/server/status/StatusBarPolicy.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,9 @@ private boolean isEvdo() {
843843
&& ((mServiceState.getRadioTechnology()
844844
== ServiceState.RADIO_TECHNOLOGY_EVDO_0)
845845
|| (mServiceState.getRadioTechnology()
846-
== ServiceState.RADIO_TECHNOLOGY_EVDO_A)));
846+
== ServiceState.RADIO_TECHNOLOGY_EVDO_A)
847+
|| (mServiceState.getRadioTechnology()
848+
== ServiceState.RADIO_TECHNOLOGY_EVDO_B)));
847849
}
848850

849851
private boolean hasService() {
@@ -958,7 +960,6 @@ private int getEvdoLevel() {
958960
}
959961

960962
private final void updateDataNetType(int net) {
961-
962963
switch (net) {
963964
case TelephonyManager.NETWORK_TYPE_EDGE:
964965
mDataIconList = sDataNetType_e;
@@ -984,6 +985,7 @@ private final void updateDataNetType(int net) {
984985
break;
985986
case TelephonyManager.NETWORK_TYPE_EVDO_0: //fall through
986987
case TelephonyManager.NETWORK_TYPE_EVDO_A:
988+
case TelephonyManager.NETWORK_TYPE_EVDO_B:
987989
mDataIconList = sDataNetType_3g;
988990
break;
989991
default:

telephony/java/android/telephony/ServiceState.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ public class ServiceState implements Parcelable {
8989
public static final int RADIO_TECHNOLOGY_HSUPA = 10;
9090
/** @hide */
9191
public static final int RADIO_TECHNOLOGY_HSPA = 11;
92+
/** @hide */
93+
public static final int RADIO_TECHNOLOGY_EVDO_B = 12;
9294

9395
/**
9496
* Available registration states for GSM, UMTS and CDMA.
@@ -365,7 +367,6 @@ && equalsHandlesNulls(mCdmaDefaultRoamingIndicator,
365367
@Override
366368
public String toString() {
367369
String radioTechnology = new String("Error in radioTechnology");
368-
369370
switch(this.mRadioTechnology) {
370371
case 0:
371372
radioTechnology = "Unknown";
@@ -403,6 +404,9 @@ public String toString() {
403404
case 11:
404405
radioTechnology = "HSPA";
405406
break;
407+
case 12:
408+
radioTechnology = "EvDo rev. B";
409+
break;
406410
default:
407411
Log.w(LOG_TAG, "mRadioTechnology variable out of range.");
408412
break;

telephony/java/android/telephony/TelephonyManager.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,9 @@ public String getNetworkCountryIso() {
386386
public static final int NETWORK_TYPE_HSUPA = 9;
387387
/** Current network is HSPA */
388388
public static final int NETWORK_TYPE_HSPA = 10;
389+
/** Current network is EVDO revision B*/
390+
public static final int NETWORK_TYPE_EVDO_B = 12;
391+
389392

390393
/**
391394
* Returns a constant indicating the radio technology (network type)
@@ -402,6 +405,7 @@ public String getNetworkCountryIso() {
402405
* @see #NETWORK_TYPE_CDMA
403406
* @see #NETWORK_TYPE_EVDO_0
404407
* @see #NETWORK_TYPE_EVDO_A
408+
* @see #NETWORK_TYPE_EVDO_B
405409
* @see #NETWORK_TYPE_1xRTT
406410
*/
407411
public int getNetworkType() {
@@ -449,6 +453,8 @@ public String getNetworkTypeName() {
449453
return "CDMA - EvDo rev. 0";
450454
case NETWORK_TYPE_EVDO_A:
451455
return "CDMA - EvDo rev. A";
456+
case NETWORK_TYPE_EVDO_B:
457+
return "CDMA - EvDo rev. B";
452458
case NETWORK_TYPE_1xRTT:
453459
return "CDMA - 1xRTT";
454460
default:

telephony/java/com/android/internal/telephony/ServiceStateTracker.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public abstract class ServiceStateTracker extends Handler {
4444
protected static final int DATA_ACCESS_HSDPA = 9;
4545
protected static final int DATA_ACCESS_HSUPA = 10;
4646
protected static final int DATA_ACCESS_HSPA = 11;
47+
protected static final int DATA_ACCESS_CDMA_EvDo_B = 12;
4748

4849
protected CommandsInterface cm;
4950

telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,9 @@ private static String networkTypeToString(int type) {
919919
case DATA_ACCESS_CDMA_EvDo_A:
920920
ret = "CDMA - EvDo rev. A";
921921
break;
922+
case DATA_ACCESS_CDMA_EvDo_B:
923+
ret = "CDMA - EvDo rev. B";
924+
break;
922925
default:
923926
if (DBG) {
924927
Log.e(LOG_TAG, "Wrong network. Can not return a string.");
@@ -1204,6 +1207,7 @@ private int radioTechnologyToDataServiceState(int code) {
12041207
case 6: // RADIO_TECHNOLOGY_1xRTT
12051208
case 7: // RADIO_TECHNOLOGY_EVDO_0
12061209
case 8: // RADIO_TECHNOLOGY_EVDO_A
1210+
case 12: // RADIO_TECHNOLOGY_EVDO_B
12071211
retVal = ServiceState.STATE_IN_SERVICE;
12081212
break;
12091213
default:

0 commit comments

Comments
 (0)