summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPauloftheWest <paulofthewest@google.com>2014-09-20 00:00:54 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-20 00:00:54 +0000
commit04301e3d9b1b8dc0b21b97d01856474fa10990d5 (patch)
tree191a2063a04b9263ad9281562dd47d9c253b6a01
parente9a8b3df7d9050517b29aa7bb57f92adc833ea7b (diff)
parent3845f270ff1c51611cc14b524878ae6c83e41590 (diff)
downloadpackages_apps_Settings-04301e3d9b1b8dc0b21b97d01856474fa10990d5.zip
packages_apps_Settings-04301e3d9b1b8dc0b21b97d01856474fa10990d5.tar.gz
packages_apps_Settings-04301e3d9b1b8dc0b21b97d01856474fa10990d5.tar.bz2
am 3845f270: am 27dcfbbd: Merge "Fixed a Bluetooth discovery bug." into lmp-dev
* commit '3845f270ff1c51611cc14b524878ae6c83e41590': Fixed a Bluetooth discovery bug.
-rwxr-xr-xsrc/com/android/settings/bluetooth/BluetoothSettings.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/settings/bluetooth/BluetoothSettings.java b/src/com/android/settings/bluetooth/BluetoothSettings.java
index 826a451..dd2c9df 100755
--- a/src/com/android/settings/bluetooth/BluetoothSettings.java
+++ b/src/com/android/settings/bluetooth/BluetoothSettings.java
@@ -98,10 +98,17 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem
private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
- String action = intent.getAction();
+ final String action = intent.getAction();
+ final int state =
+ intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR);
+
if (action.equals(BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED)) {
updateDeviceName(context);
}
+
+ if (state == BluetoothAdapter.STATE_ON) {
+ mInitiateDiscoverable = true;
+ }
}
private void updateDeviceName(Context context) {