summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2009-12-02 16:08:05 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2009-12-02 16:08:05 -0800
commit08ff9396f731ffab27a7c46482d8ba4c034a5356 (patch)
tree619b313ce4192fe8d80a1449cdc1a98cb82044c5
parentd82282058969216f465a0b2a0f37974be507b465 (diff)
parent9f1d9c16887d2bdebce65ceb1ac80e1fedd9ef48 (diff)
downloadpackages_apps_settings-08ff9396f731ffab27a7c46482d8ba4c034a5356.zip
packages_apps_settings-08ff9396f731ffab27a7c46482d8ba4c034a5356.tar.gz
packages_apps_settings-08ff9396f731ffab27a7c46482d8ba4c034a5356.tar.bz2
am 9f1d9c16: Merge change I9a1ed7e4 into eclair
Merge commit '9f1d9c16887d2bdebce65ceb1ac80e1fedd9ef48' into eclair-plus-aosp * commit '9f1d9c16887d2bdebce65ceb1ac80e1fedd9ef48': Update to reflect new priorities for A2DP profile. DO NOT MERGE.
-rw-r--r--src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java b/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java
index a6258e2..44e2be3 100644
--- a/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java
+++ b/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java
@@ -176,6 +176,8 @@ public abstract class LocalBluetoothProfileManager {
@Override
public boolean disconnect(BluetoothDevice device) {
+ // Downgrade priority as user is disconnecting the sink.
+ mService.setSinkPriority(device, BluetoothA2dp.PRIORITY_ON);
return mService.disconnectSink(device);
}
@@ -203,7 +205,7 @@ public abstract class LocalBluetoothProfileManager {
@Override
public void setPreferred(BluetoothDevice device, boolean preferred) {
mService.setSinkPriority(device,
- preferred ? BluetoothA2dp.PRIORITY_AUTO : BluetoothA2dp.PRIORITY_OFF);
+ preferred ? BluetoothA2dp.PRIORITY_AUTO_CONNECT : BluetoothA2dp.PRIORITY_OFF);
}
@Override
@@ -269,6 +271,8 @@ public abstract class LocalBluetoothProfileManager {
@Override
public boolean disconnect(BluetoothDevice device) {
if (mService.getCurrentHeadset().equals(device)) {
+ // Downgrade prority as user is disconnecting the headset.
+ mService.setPriority(device, BluetoothHeadset.PRIORITY_ON);
return mService.disconnectHeadset();
} else {
return false;
@@ -302,7 +306,7 @@ public abstract class LocalBluetoothProfileManager {
@Override
public void setPreferred(BluetoothDevice device, boolean preferred) {
mService.setPriority(device,
- preferred ? BluetoothHeadset.PRIORITY_AUTO : BluetoothHeadset.PRIORITY_OFF);
+ preferred ? BluetoothHeadset.PRIORITY_AUTO_CONNECT : BluetoothHeadset.PRIORITY_OFF);
}
@Override