From ad1f28cde0ec117a0d526bae61fb661587914f33 Mon Sep 17 00:00:00 2001 From: Avish Shah Date: Fri, 19 Jun 2015 16:50:39 +0530 Subject: [PATCH] Device Discoverability not set properly when Bluetooth is toggled Issue: When BT is turned off/on staying in the same BT Settings screen discoverability was not set again. Fix: Handle setting discoverability Bluetooth state change intents also when BT state is turned ON. Bug: 21944289 Change-Id: Ic3c8d476c53673b21d40ea2bd9669758d89c2aee --- src/com/android/settings/bluetooth/BluetoothSettings.java | 4 ++++ 1 file changed, 4 insertions(+) mode change 100755 => 100644 src/com/android/settings/bluetooth/BluetoothSettings.java diff --git a/src/com/android/settings/bluetooth/BluetoothSettings.java b/src/com/android/settings/bluetooth/BluetoothSettings.java old mode 100755 new mode 100644 index 68f47e7a6e4..4c489814dba --- a/src/com/android/settings/bluetooth/BluetoothSettings.java +++ b/src/com/android/settings/bluetooth/BluetoothSettings.java @@ -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); }