From 9f3be4c403ac13cb39449267f132e055a4a7a647 Mon Sep 17 00:00:00 2001 From: Robert Greenwalt Date: Mon, 10 Jan 2011 11:58:31 -0800 Subject: [PATCH] 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 --- services/java/com/android/server/ConnectivityService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java index a3d8ac912e..2321e30f3f 100644 --- a/services/java/com/android/server/ConnectivityService.java +++ b/services/java/com/android/server/ConnectivityService.java @@ -849,7 +849,8 @@ public class ConnectivityService extends IConnectivityManager.Stub { 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)) { + } 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; @@ -870,6 +871,8 @@ public class ConnectivityService extends IConnectivityManager.Stub { return 1; } callTeardown = true; + } else { + if (DBG) log("not a known feature - dropping"); } } if (DBG) log("Doing network teardown");