summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2010-10-13 11:09:35 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-10-13 11:09:35 -0700
commit0340371297887290d7593d7c346e422a4c9ecd1a (patch)
treea6f2912158f48848a87097ee68c4f1a520ca850b
parent083310d316059c6592120c32e1c0b736e85b83c0 (diff)
parent268d1f1e4b7266f0d7c04895a73c9c35472eacd5 (diff)
downloadpackages_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.java3
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);