Add support for EVDO Rev B

Change-Id: I8588e8b342c51f4b79bced8ef8fe60d57f07aefa
diff --git a/api/current.xml b/api/current.xml
index d8702de..d02c826 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -127479,6 +127479,17 @@
  visibility="public"
 >
 </field>
+<field name="NETWORK_TYPE_EVDO_B"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="12"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="NETWORK_TYPE_GPRS"
  type="int"
  transient="false"
diff --git a/core/java/android/net/MobileDataStateTracker.java b/core/java/android/net/MobileDataStateTracker.java
index 538e51a..8113aaa 100644
--- a/core/java/android/net/MobileDataStateTracker.java
+++ b/core/java/android/net/MobileDataStateTracker.java
@@ -304,6 +304,9 @@
         case TelephonyManager.NETWORK_TYPE_EVDO_A:
             networkTypeStr = "evdo";
             break;
+        case TelephonyManager.NETWORK_TYPE_EVDO_B:
+            networkTypeStr = "evdo";
+            break;
         }
         return "net.tcp.buffersize." + networkTypeStr;
     }
diff --git a/services/java/com/android/server/status/StatusBarPolicy.java b/services/java/com/android/server/status/StatusBarPolicy.java
index bee0930..9a3baff 100644
--- a/services/java/com/android/server/status/StatusBarPolicy.java
+++ b/services/java/com/android/server/status/StatusBarPolicy.java
@@ -843,7 +843,9 @@
                  && ((mServiceState.getRadioTechnology()
                         == ServiceState.RADIO_TECHNOLOGY_EVDO_0)
                      || (mServiceState.getRadioTechnology()
-                        == ServiceState.RADIO_TECHNOLOGY_EVDO_A)));
+                        == ServiceState.RADIO_TECHNOLOGY_EVDO_A)
+                     || (mServiceState.getRadioTechnology()
+                        == ServiceState.RADIO_TECHNOLOGY_EVDO_B)));
     }
 
     private boolean hasService() {
@@ -958,7 +960,6 @@
     }
 
     private final void updateDataNetType(int net) {
-
         switch (net) {
         case TelephonyManager.NETWORK_TYPE_EDGE:
             mDataIconList = sDataNetType_e;
@@ -984,6 +985,7 @@
             break;
         case TelephonyManager.NETWORK_TYPE_EVDO_0: //fall through
         case TelephonyManager.NETWORK_TYPE_EVDO_A:
+        case TelephonyManager.NETWORK_TYPE_EVDO_B:
             mDataIconList = sDataNetType_3g;
             break;
         default:
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java
index 48a40fa..446bbc2 100644
--- a/telephony/java/android/telephony/ServiceState.java
+++ b/telephony/java/android/telephony/ServiceState.java
@@ -89,6 +89,8 @@
     public static final int RADIO_TECHNOLOGY_HSUPA = 10;
     /** @hide */
     public static final int RADIO_TECHNOLOGY_HSPA = 11;
+    /** @hide */
+    public static final int RADIO_TECHNOLOGY_EVDO_B = 12;
 
     /**
      * Available registration states for GSM, UMTS and CDMA.
@@ -365,7 +367,6 @@
     @Override
     public String toString() {
         String radioTechnology = new String("Error in radioTechnology");
-
         switch(this.mRadioTechnology) {
         case 0:
             radioTechnology = "Unknown";
@@ -403,6 +404,9 @@
         case 11:
             radioTechnology = "HSPA";
             break;
+        case 12:
+            radioTechnology = "EvDo rev. B";
+            break;
         default:
             Log.w(LOG_TAG, "mRadioTechnology variable out of range.");
         break;
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 6685c18..310fc7f 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -386,6 +386,9 @@
     public static final int NETWORK_TYPE_HSUPA = 9;
     /** Current network is HSPA */
     public static final int NETWORK_TYPE_HSPA = 10;
+    /** Current network is EVDO revision B*/
+    public static final int NETWORK_TYPE_EVDO_B = 12;
+
 
     /**
      * Returns a constant indicating the radio technology (network type)
@@ -402,6 +405,7 @@
      * @see #NETWORK_TYPE_CDMA
      * @see #NETWORK_TYPE_EVDO_0
      * @see #NETWORK_TYPE_EVDO_A
+     * @see #NETWORK_TYPE_EVDO_B
      * @see #NETWORK_TYPE_1xRTT
      */
     public int getNetworkType() {
@@ -449,6 +453,8 @@
                 return "CDMA - EvDo rev. 0";
             case NETWORK_TYPE_EVDO_A:
                 return "CDMA - EvDo rev. A";
+            case NETWORK_TYPE_EVDO_B:
+                return "CDMA - EvDo rev. B";
             case NETWORK_TYPE_1xRTT:
                 return "CDMA - 1xRTT";
             default:
diff --git a/telephony/java/com/android/internal/telephony/ServiceStateTracker.java b/telephony/java/com/android/internal/telephony/ServiceStateTracker.java
index 6892998..be4fdb4 100644
--- a/telephony/java/com/android/internal/telephony/ServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/ServiceStateTracker.java
@@ -44,6 +44,7 @@
     protected static final int DATA_ACCESS_HSDPA = 9;
     protected static final int DATA_ACCESS_HSUPA = 10;
     protected static final int DATA_ACCESS_HSPA = 11;
+    protected static final int DATA_ACCESS_CDMA_EvDo_B = 12;
 
     protected CommandsInterface cm;
 
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
index 1fb3432..e0c3a47 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
@@ -919,6 +919,9 @@
         case DATA_ACCESS_CDMA_EvDo_A:
             ret = "CDMA - EvDo rev. A";
             break;
+        case DATA_ACCESS_CDMA_EvDo_B:
+            ret = "CDMA - EvDo rev. B";
+            break;
         default:
             if (DBG) {
                 Log.e(LOG_TAG, "Wrong network. Can not return a string.");
@@ -1204,6 +1207,7 @@
         case 6: // RADIO_TECHNOLOGY_1xRTT
         case 7: // RADIO_TECHNOLOGY_EVDO_0
         case 8: // RADIO_TECHNOLOGY_EVDO_A
+        case 12: // RADIO_TECHNOLOGY_EVDO_B
             retVal = ServiceState.STATE_IN_SERVICE;
             break;
         default: