diff options
author | PauloftheWest <paulofthewest@google.com> | 2014-09-20 00:38:27 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-09-20 00:38:27 +0000 |
commit | a3825836b85319c7a9ec9c8a4904af9211e174ce (patch) | |
tree | 76b3da01fe835bd39c617b8541972cbbd394896d | |
parent | 5d05e36b7ecf46afaeba77fe60988dc3dcd784ea (diff) | |
parent | c8648718db9c05482579a46e48907851849b1670 (diff) | |
download | packages_apps_Settings-a3825836b85319c7a9ec9c8a4904af9211e174ce.zip packages_apps_Settings-a3825836b85319c7a9ec9c8a4904af9211e174ce.tar.gz packages_apps_Settings-a3825836b85319c7a9ec9c8a4904af9211e174ce.tar.bz2 |
am c8648718: am 934af544: am 04301e3d: am 3845f270: am 27dcfbbd: Merge "Fixed a Bluetooth discovery bug." into lmp-dev
* commit 'c8648718db9c05482579a46e48907851849b1670':
Fixed a Bluetooth discovery bug.
-rwxr-xr-x | src/com/android/settings/bluetooth/BluetoothSettings.java | 9 |
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) { |