Skip to content

Commit 81433a3

Browse files
Robert GreenwaltAndroid (Google) Code Review
authored andcommitted
Merge "Temp disable Tethering if DUN is required" into ics-mr0
2 parents 28b3fd1 + 4efe58d commit 81433a3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

services/java/com/android/server/ConnectivityService.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2450,6 +2450,12 @@ public boolean isTetheringSupported() {
24502450
int defaultVal = (SystemProperties.get("ro.tether.denied").equals("true") ? 0 : 1);
24512451
boolean tetherEnabledInSettings = (Settings.Secure.getInt(mContext.getContentResolver(),
24522452
Settings.Secure.TETHER_SUPPORTED, defaultVal) != 0);
2453+
// Short term disabling of Tethering if DUN is required.
2454+
// TODO - fix multi-connection tethering using policy-base routing
2455+
int[] upstreamConnTypes = mTethering.getUpstreamIfaceTypes();
2456+
for (int i : upstreamConnTypes) {
2457+
if (i == ConnectivityManager.TYPE_MOBILE_DUN) return false;
2458+
}
24532459
return tetherEnabledInSettings && mTetheringConfigValid;
24542460
}
24552461

0 commit comments

Comments
 (0)