am ad1f28cd: Device Discoverability not set properly when Bluetooth is toggled

* commit 'ad1f28cde0ec117a0d526bae61fb661587914f33':
  Device Discoverability not set properly when Bluetooth is toggled
This commit is contained in:
Avish Shah
2015-07-01 16:19:36 +00:00
committed by Android Git Automerger

View File

@@ -416,6 +416,10 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem
@Override
public void onBluetoothStateChanged(int bluetoothState) {
super.onBluetoothStateChanged(bluetoothState);
// If BT is turned off/on staying in the same BT Settings screen
// discoverability to be set again
if (BluetoothAdapter.STATE_ON == bluetoothState)
mInitiateDiscoverable = true;
updateContent(bluetoothState);
}