summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2010-06-01 17:52:44 -0700
committerJaikumar Ganesh <jaikumar@google.com>2010-06-07 10:50:57 -0700
commit8038834f8e768f6a62b4c7d5498160eb2c8b4895 (patch)
tree0984008fee52aede26fe624106ba047538930cbc /src/com/android/settings
parent4223830c65d99c0db03557ab23bd628db7e76f9f (diff)
downloadpackages_apps_settings-8038834f8e768f6a62b4c7d5498160eb2c8b4895.zip
packages_apps_settings-8038834f8e768f6a62b4c7d5498160eb2c8b4895.tar.gz
packages_apps_settings-8038834f8e768f6a62b4c7d5498160eb2c8b4895.tar.bz2
Changing disconnectHeadset calls.
Change-Id: I2f058f28a09e983cd42e5a74bb4ffea19f07b880
Diffstat (limited to 'src/com/android/settings')
-rw-r--r--src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java b/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java
index 6179dc7..01714fe 100644
--- a/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java
+++ b/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java
@@ -370,7 +370,10 @@ public abstract class LocalBluetoothProfileManager {
public boolean connect(BluetoothDevice device) {
// Since connectHeadset fails if already connected to a headset, we
// disconnect from any headset first
- mService.disconnectHeadset();
+ BluetoothDevice currDevice = mService.getCurrentHeadset();
+ if (currDevice != null) {
+ mService.disconnectHeadset(currDevice);
+ }
return mService.connectHeadset(device);
}
@@ -381,7 +384,7 @@ public abstract class LocalBluetoothProfileManager {
if (mService.getPriority(device) > BluetoothHeadset.PRIORITY_ON) {
mService.setPriority(device, BluetoothHeadset.PRIORITY_ON);
}
- return mService.disconnectHeadset();
+ return mService.disconnectHeadset(device);
} else {
return false;
}
@@ -391,7 +394,7 @@ public abstract class LocalBluetoothProfileManager {
public int getConnectionStatus(BluetoothDevice device) {
BluetoothDevice currentDevice = mService.getCurrentHeadset();
return currentDevice != null && currentDevice.equals(device)
- ? convertState(mService.getState())
+ ? convertState(mService.getState(device))
: SettingsBtStatus.CONNECTION_STATUS_DISCONNECTED;
}