Turn off DUN connection after tethering.

Use matching feature type when turning tethering off or the request is ignored.

Also, turn on DUN apn right away so that we don't fail aggressive test cases.

Also don't report connections for enabled apn's that we're no longer connected to.

bug:3332880
bug:3338033
Change-Id: I7db2dfd4879f03465bc9f6d39488c078570dcaf3
This commit is contained in:
Robert Greenwalt
2011-01-10 11:58:31 -08:00
parent 4b7c55e4ee
commit 9f3be4c403

View File

@@ -849,7 +849,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
usedNetworkType = ConnectivityManager.TYPE_MOBILE_MMS; usedNetworkType = ConnectivityManager.TYPE_MOBILE_MMS;
} else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_SUPL)) { } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_SUPL)) {
usedNetworkType = ConnectivityManager.TYPE_MOBILE_SUPL; usedNetworkType = ConnectivityManager.TYPE_MOBILE_SUPL;
} else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN)) { } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN) ||
TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN_ALWAYS)) {
usedNetworkType = ConnectivityManager.TYPE_MOBILE_DUN; usedNetworkType = ConnectivityManager.TYPE_MOBILE_DUN;
} else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_HIPRI)) { } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_HIPRI)) {
usedNetworkType = ConnectivityManager.TYPE_MOBILE_HIPRI; usedNetworkType = ConnectivityManager.TYPE_MOBILE_HIPRI;
@@ -870,6 +871,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
return 1; return 1;
} }
callTeardown = true; callTeardown = true;
} else {
if (DBG) log("not a known feature - dropping");
} }
} }
if (DBG) log("Doing network teardown"); if (DBG) log("Doing network teardown");