Just use device configuration for Tethering.

Don't need extra code here if the device is configured propertly.

Change-Id: Ieb65e36c1c91a62bbb0c8619e2efb34735fbb564
This commit is contained in:
Robert Greenwalt
2011-02-25 17:25:38 -08:00
parent 8639a46a22
commit 4ad4b4fdf7

View File

@@ -148,7 +148,7 @@ public class WirelessSettings extends SettingsPreferenceFragment {
// Disable Tethering if it's not allowed or if it's a wifi-only device // Disable Tethering if it's not allowed or if it's a wifi-only device
ConnectivityManager cm = ConnectivityManager cm =
(ConnectivityManager) activity.getSystemService(Context.CONNECTIVITY_SERVICE); (ConnectivityManager) activity.getSystemService(Context.CONNECTIVITY_SERVICE);
if (!cm.isTetheringSupported() || Utils.isWifiOnly()) { if (!cm.isTetheringSupported()) {
getPreferenceScreen().removePreference(findPreference(KEY_TETHER_SETTINGS)); getPreferenceScreen().removePreference(findPreference(KEY_TETHER_SETTINGS));
} else { } else {
String[] usbRegexs = cm.getTetherableUsbRegexs(); String[] usbRegexs = cm.getTetherableUsbRegexs();