diff options
author | Jaikumar Ganesh <jaikumar@google.com> | 2010-10-13 11:09:35 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-10-13 11:09:35 -0700 |
commit | 0340371297887290d7593d7c346e422a4c9ecd1a (patch) | |
tree | a6f2912158f48848a87097ee68c4f1a520ca850b | |
parent | 083310d316059c6592120c32e1c0b736e85b83c0 (diff) | |
parent | 268d1f1e4b7266f0d7c04895a73c9c35472eacd5 (diff) | |
download | packages_apps_settings-0340371297887290d7593d7c346e422a4c9ecd1a.zip packages_apps_settings-0340371297887290d7593d7c346e422a4c9ecd1a.tar.gz packages_apps_settings-0340371297887290d7593d7c346e422a4c9ecd1a.tar.bz2 |
Merge "DO NOT MERGE Add null check before disconnecting a device." into gingerbread
-rw-r--r-- | src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java b/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java index 01714fe..5fcddf0 100644 --- a/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java +++ b/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java @@ -379,7 +379,8 @@ public abstract class LocalBluetoothProfileManager { @Override public boolean disconnect(BluetoothDevice device) { - if (mService.getCurrentHeadset().equals(device)) { + BluetoothDevice currDevice = mService.getCurrentHeadset(); + if (currDevice != null && currDevice.equals(device)) { // Downgrade prority as user is disconnecting the headset. if (mService.getPriority(device) > BluetoothHeadset.PRIORITY_ON) { mService.setPriority(device, BluetoothHeadset.PRIORITY_ON); |