summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2010-06-07 14:12:01 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-06-07 14:12:01 -0700
commit68a5bd361d59e1f73e4b6b6eb2e9f3ecef2b929a (patch)
treeb53ae638316a6e2fc18ca529421887d1407a4ca6 /src
parent728ac35373028b79205a788c526ef4b495518ec1 (diff)
parent8038834f8e768f6a62b4c7d5498160eb2c8b4895 (diff)
downloadpackages_apps_Settings-68a5bd361d59e1f73e4b6b6eb2e9f3ecef2b929a.zip
packages_apps_Settings-68a5bd361d59e1f73e4b6b6eb2e9f3ecef2b929a.tar.gz
packages_apps_Settings-68a5bd361d59e1f73e4b6b6eb2e9f3ecef2b929a.tar.bz2
Merge "Changing disconnectHeadset calls." into kraken
Diffstat (limited to 'src')
-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;
}