Do not merge: Revert the revert of "LTE Changes for Telephony including Multiple PDN support and IPV6 support"
This reverts commit bbba216fe3
and is the first of the LTE commits in master being back ported
to the LTE branch.
Change-Id: I17d4a1b779ed74bc7dfb409d2c1a30f60fdb27c7
This commit is contained in:
@@ -221,12 +221,32 @@ public class ConnectivityManager
|
|||||||
|
|
||||||
/** {@hide} */
|
/** {@hide} */
|
||||||
public static final int TYPE_DUMMY = 8;
|
public static final int TYPE_DUMMY = 8;
|
||||||
|
|
||||||
/** {@hide} */
|
/** {@hide} */
|
||||||
public static final int TYPE_ETHERNET = 9;
|
public static final int TYPE_ETHERNET = 9;
|
||||||
/** {@hide} TODO: Need to adjust this for WiMAX. */
|
/**
|
||||||
public static final int MAX_RADIO_TYPE = TYPE_DUMMY;
|
* Over the air Adminstration.
|
||||||
/** {@hide} TODO: Need to adjust this for WiMAX. */
|
* {@hide}
|
||||||
public static final int MAX_NETWORK_TYPE = TYPE_DUMMY;
|
*/
|
||||||
|
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;
|
||||||
|
|
||||||
public static final int DEFAULT_NETWORK_PREFERENCE = TYPE_WIFI;
|
public static final int DEFAULT_NETWORK_PREFERENCE = TYPE_WIFI;
|
||||||
|
|
||||||
|
|||||||
@@ -696,15 +696,10 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
// TODO - move this into the MobileDataStateTracker
|
// TODO - move this into the MobileDataStateTracker
|
||||||
int usedNetworkType = networkType;
|
int usedNetworkType = networkType;
|
||||||
if(networkType == ConnectivityManager.TYPE_MOBILE) {
|
if(networkType == ConnectivityManager.TYPE_MOBILE) {
|
||||||
if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_MMS)) {
|
usedNetworkType = convertFeatureToNetworkType(feature);
|
||||||
usedNetworkType = ConnectivityManager.TYPE_MOBILE_MMS;
|
if (usedNetworkType < 0) {
|
||||||
} else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_SUPL)) {
|
Slog.e(TAG, "Can't match any netTracker!");
|
||||||
usedNetworkType = ConnectivityManager.TYPE_MOBILE_SUPL;
|
usedNetworkType = networkType;
|
||||||
} 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];
|
NetworkStateTracker network = mNetTrackers[usedNetworkType];
|
||||||
@@ -848,15 +843,9 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
// TODO - move to MobileDataStateTracker
|
// TODO - move to MobileDataStateTracker
|
||||||
int usedNetworkType = networkType;
|
int usedNetworkType = networkType;
|
||||||
if (networkType == ConnectivityManager.TYPE_MOBILE) {
|
if (networkType == ConnectivityManager.TYPE_MOBILE) {
|
||||||
if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_MMS)) {
|
usedNetworkType = convertFeatureToNetworkType(feature);
|
||||||
usedNetworkType = ConnectivityManager.TYPE_MOBILE_MMS;
|
if (usedNetworkType < 0) {
|
||||||
} else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_SUPL)) {
|
usedNetworkType = networkType;
|
||||||
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];
|
tracker = mNetTrackers[usedNetworkType];
|
||||||
@@ -2174,4 +2163,24 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
private void loge(String s) {
|
private void loge(String s) {
|
||||||
Slog.e(TAG, 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user