From 274518a2790b38de7a41109182b56817d1f67c27 Mon Sep 17 00:00:00 2001 From: Robert Greenwalt Date: Thu, 27 Oct 2011 14:50:27 -0700 Subject: [PATCH] Temp disable Tethering if DUN is required Getting source-based routing working is too risk for this point in the project but tethering is broken otherwise, so disable the tethering option if DUN is required until we can get a real fix in. bug:5495862 Change-Id: I5e852bf30c887599024a8b61af86ffec1d5333af --- services/java/com/android/server/ConnectivityService.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java index 498bdfcb60..851cb33604 100644 --- a/services/java/com/android/server/ConnectivityService.java +++ b/services/java/com/android/server/ConnectivityService.java @@ -2450,6 +2450,12 @@ public class ConnectivityService extends IConnectivityManager.Stub { int defaultVal = (SystemProperties.get("ro.tether.denied").equals("true") ? 0 : 1); boolean tetherEnabledInSettings = (Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.TETHER_SUPPORTED, defaultVal) != 0); + // Short term disabling of Tethering if DUN is required. + // TODO - fix multi-connection tethering using policy-base routing + int[] upstreamConnTypes = mTethering.getUpstreamIfaceTypes(); + for (int i : upstreamConnTypes) { + if (i == ConnectivityManager.TYPE_MOBILE_DUN) return false; + } return tetherEnabledInSettings && mTetheringConfigValid; }