am 81433a38
: Merge "Temp disable Tethering if DUN is required" into ics-mr0
* commit '81433a38784e64dbc155047a3915cf5eff32840b': Temp disable Tethering if DUN is required
This commit is contained in:
@ -2450,6 +2450,12 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
int defaultVal = (SystemProperties.get("ro.tether.denied").equals("true") ? 0 : 1);
|
int defaultVal = (SystemProperties.get("ro.tether.denied").equals("true") ? 0 : 1);
|
||||||
boolean tetherEnabledInSettings = (Settings.Secure.getInt(mContext.getContentResolver(),
|
boolean tetherEnabledInSettings = (Settings.Secure.getInt(mContext.getContentResolver(),
|
||||||
Settings.Secure.TETHER_SUPPORTED, defaultVal) != 0);
|
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;
|
return tetherEnabledInSettings && mTetheringConfigValid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user