Add network type TYPE_MOBILE_IA.
Add a network type for establishing connections to the apn used for the initial connection. Enable some debug for now. Bug: 8733613 Change-Id: Ia627ac0cf5715660b6d02bb13a83d46ec1727b87
This commit is contained in:
@@ -355,11 +355,17 @@ public class ConnectivityManager {
|
||||
*/
|
||||
public static final int TYPE_WIFI_P2P = 13;
|
||||
|
||||
/** {@hide} */
|
||||
public static final int MAX_RADIO_TYPE = TYPE_WIFI_P2P;
|
||||
/**
|
||||
* The network to use for initially attaching to the network
|
||||
* {@hide}
|
||||
*/
|
||||
public static final int TYPE_MOBILE_IA = 14;
|
||||
|
||||
/** {@hide} */
|
||||
public static final int MAX_NETWORK_TYPE = TYPE_WIFI_P2P;
|
||||
public static final int MAX_RADIO_TYPE = TYPE_MOBILE_IA;
|
||||
|
||||
/** {@hide} */
|
||||
public static final int MAX_NETWORK_TYPE = TYPE_MOBILE_IA;
|
||||
|
||||
/**
|
||||
* If you want to set the default network preference,you can directly
|
||||
@@ -436,6 +442,8 @@ public class ConnectivityManager {
|
||||
return "MOBILE_CBS";
|
||||
case TYPE_WIFI_P2P:
|
||||
return "WIFI_P2P";
|
||||
case TYPE_MOBILE_IA:
|
||||
return "MOBILE_IA";
|
||||
default:
|
||||
return Integer.toString(type);
|
||||
}
|
||||
@@ -458,6 +466,7 @@ public class ConnectivityManager {
|
||||
case TYPE_MOBILE_FOTA:
|
||||
case TYPE_MOBILE_IMS:
|
||||
case TYPE_MOBILE_CBS:
|
||||
case TYPE_MOBILE_IA:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
@@ -489,6 +498,7 @@ public class ConnectivityManager {
|
||||
case TYPE_MOBILE_MMS:
|
||||
case TYPE_MOBILE_SUPL:
|
||||
case TYPE_MOBILE_HIPRI:
|
||||
case TYPE_MOBILE_IA:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
||||
@@ -472,6 +472,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
||||
com.android.internal.R.array.radioAttributes);
|
||||
for (String raString : raStrings) {
|
||||
RadioAttributes r = new RadioAttributes(raString);
|
||||
if (VDBG) log("raString=" + raString + " r=" + r);
|
||||
if (r.mType > ConnectivityManager.MAX_RADIO_TYPE) {
|
||||
loge("Error in radioAttributes - ignoring attempt to define type " + r.mType);
|
||||
continue;
|
||||
@@ -492,6 +493,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
||||
for (String naString : naStrings) {
|
||||
try {
|
||||
NetworkConfig n = new NetworkConfig(naString);
|
||||
if (VDBG) log("naString=" + naString + " config=" + n);
|
||||
if (n.type > ConnectivityManager.MAX_NETWORK_TYPE) {
|
||||
loge("Error in networkAttributes - ignoring attempt to define type " +
|
||||
n.type);
|
||||
@@ -518,6 +520,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
||||
// ignore it - leave the entry null
|
||||
}
|
||||
}
|
||||
if (VDBG) log("mNetworksDefined=" + mNetworksDefined);
|
||||
|
||||
mProtectedNetworks = new ArrayList<Integer>();
|
||||
int[] protectedNetworks = context.getResources().getIntArray(
|
||||
|
||||
Reference in New Issue
Block a user