DO NOT MERGE: Revert "LTE Changes for Telephony including Multiple PDN support and IPV6 support"

This reverts commit f6b76694937994ab2611a76f1cdbf101438304df.

Change-Id: Ifc4e9aaccb54e065a36380710694cd6e4d347636
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index 26f375d..cab8ed2 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -221,32 +221,12 @@
 
     /** {@hide} */
     public static final int TYPE_DUMMY       = 8;
-
     /** {@hide} */
     public static final int TYPE_ETHERNET    = 9;
-    /**
-     * Over the air Adminstration.
-     * {@hide}
-     */
-    public static final int TYPE_MOBILE_FOTA = 10;
-
-    /**
-     * IP Multimedia Subsystem
-     * {@hide}
-     */
-    public static final int TYPE_MOBILE_IMS  = 11;
-
-    /**
-     * Carrier Branded Services
-     * {@hide}
-     */
-    public static final int TYPE_MOBILE_CBS  = 12;
-
-    /** {@hide} */
-    public static final int MAX_RADIO_TYPE   = TYPE_MOBILE_CBS;
-
-    /** {@hide} */
-    public static final int MAX_NETWORK_TYPE = TYPE_MOBILE_CBS;
+    /** {@hide} TODO: Need to adjust this for WiMAX. */
+    public static final int MAX_RADIO_TYPE   = TYPE_DUMMY;
+    /** {@hide} TODO: Need to adjust this for WiMAX. */
+    public static final int MAX_NETWORK_TYPE = TYPE_DUMMY;
 
     public static final int DEFAULT_NETWORK_PREFERENCE = TYPE_WIFI;
 
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index b7d0a8f..14a6b96 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -696,10 +696,15 @@
         // TODO - move this into the MobileDataStateTracker
         int usedNetworkType = networkType;
         if(networkType == ConnectivityManager.TYPE_MOBILE) {
-            usedNetworkType = convertFeatureToNetworkType(feature);
-            if (usedNetworkType < 0) {
-                Slog.e(TAG, "Can't match any netTracker!");
-                usedNetworkType = networkType;
+            if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_MMS)) {
+                usedNetworkType = ConnectivityManager.TYPE_MOBILE_MMS;
+            } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_SUPL)) {
+                usedNetworkType = ConnectivityManager.TYPE_MOBILE_SUPL;
+            } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN) ||
+                    TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN_ALWAYS)) {
+                usedNetworkType = ConnectivityManager.TYPE_MOBILE_DUN;
+            } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_HIPRI)) {
+                usedNetworkType = ConnectivityManager.TYPE_MOBILE_HIPRI;
             }
         }
         NetworkStateTracker network = mNetTrackers[usedNetworkType];
@@ -843,9 +848,15 @@
             // TODO - move to MobileDataStateTracker
             int usedNetworkType = networkType;
             if (networkType == ConnectivityManager.TYPE_MOBILE) {
-                usedNetworkType = convertFeatureToNetworkType(feature);
-                if (usedNetworkType < 0) {
-                    usedNetworkType = networkType;
+                if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_MMS)) {
+                    usedNetworkType = ConnectivityManager.TYPE_MOBILE_MMS;
+                } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_SUPL)) {
+                    usedNetworkType = ConnectivityManager.TYPE_MOBILE_SUPL;
+                } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN) ||
+                        TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN_ALWAYS)) {
+                    usedNetworkType = ConnectivityManager.TYPE_MOBILE_DUN;
+                } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_HIPRI)) {
+                    usedNetworkType = ConnectivityManager.TYPE_MOBILE_HIPRI;
                 }
             }
             tracker =  mNetTrackers[usedNetworkType];
@@ -2163,24 +2174,4 @@
     private void loge(String s) {
         Slog.e(TAG, s);
     }
-    int convertFeatureToNetworkType(String feature){
-        int networkType = -1;
-        if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_MMS)) {
-            networkType = ConnectivityManager.TYPE_MOBILE_MMS;
-        } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_SUPL)) {
-            networkType = ConnectivityManager.TYPE_MOBILE_SUPL;
-        } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN) ||
-                TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN_ALWAYS)) {
-            networkType = ConnectivityManager.TYPE_MOBILE_DUN;
-        } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_HIPRI)) {
-            networkType = ConnectivityManager.TYPE_MOBILE_HIPRI;
-        } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_FOTA)) {
-            networkType = ConnectivityManager.TYPE_MOBILE_FOTA;
-        } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_IMS)) {
-            networkType = ConnectivityManager.TYPE_MOBILE_IMS;
-        } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_CBS)) {
-            networkType = ConnectivityManager.TYPE_MOBILE_CBS;
-        }
-        return networkType;
-    }
 }