alps/vendor/mediatek/proprietary/packages/apps/MtkSettings/res/xml/location_scanning.xml
index f82500b..ccb0bd8 100644
@@ -23,10 +23,10 @@
android:defaultValue="true"
android:key="wifi_always_scanning" />
- <SwitchPreference
+ <!--SwitchPreference
android:title="@string/location_scanning_bluetooth_always_scanning_title"
android:summary="@string/location_scanning_bluetooth_always_scanning_description"
android:defaultValue="true"
- android:key="bluetooth_always_scanning" />
+ android:key="bluetooth_always_scanning" /-->
</PreferenceScreen>
alps/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/TetherSettings.java
index bfde370..fdf9d16 100644
@@ -181,7 +181,7 @@ public class TetherSettings extends RestrictedSettingsFragment
mWifiTetherPreferenceController.displayPreference(getPreferenceScreen());
- if (!bluetoothAvailable) {
+ if (!bluetoothAvailable || null == adapter) {
getPreferenceScreen().removePreference(mBluetoothTether);
} else {
BluetoothPan pan = mBluetoothPan.get();
@@ -529,11 +529,16 @@ public class TetherSettings extends RestrictedSettingsFragment
final List<String> keys = super.getNonIndexableKeys(context);
final ConnectivityManager cm =
context.getSystemService(ConnectivityManager.class);
-
+ BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
+
if (!TetherUtil.isTetherAvailable(context)) {
keys.add(KEY_TETHER_PREFS_SCREEN);
keys.add(KEY_WIFI_TETHER);
}
+
+ if (null == adapter) {
+ keys.add(KEY_WIFI_TETHER);
+ }
final boolean usbAvailable =
cm.getTetherableUsbRegexs().length != 0;
@@ -543,7 +548,7 @@ public class TetherSettings extends RestrictedSettingsFragment
final boolean bluetoothAvailable =
cm.getTetherableBluetoothRegexs().length != 0;
- if (!bluetoothAvailable) {
+ if (!bluetoothAvailable || null == adapter) {
keys.add(KEY_ENABLE_BLUETOOTH_TETHERING);
}
|