From ccaebfc9428aa7c167caf469f7393e1fb375307e Mon Sep 17 00:00:00 2001 From: Jaikumar Ganesh Date: Fri, 8 Jan 2010 18:26:14 -0800 Subject: Don't set priority in Bonding state. This was causing A2DP get connected for Car Docks, when user didn't select it. Bug: 2364328 Dr No: Eastham --- core/java/android/server/BluetoothA2dpService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'core/java/android/server') diff --git a/core/java/android/server/BluetoothA2dpService.java b/core/java/android/server/BluetoothA2dpService.java index 8859339..1742e72 100644 --- a/core/java/android/server/BluetoothA2dpService.java +++ b/core/java/android/server/BluetoothA2dpService.java @@ -100,7 +100,6 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub { setSinkPriority(device, BluetoothA2dp.PRIORITY_ON); } break; - case BluetoothDevice.BOND_BONDING: case BluetoothDevice.BOND_NONE: setSinkPriority(device, BluetoothA2dp.PRIORITY_UNDEFINED); break; @@ -400,7 +399,7 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub { mContext.enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); return Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.getBluetoothA2dpSinkPriorityKey(device.getAddress()), - BluetoothA2dp.PRIORITY_OFF); + BluetoothA2dp.PRIORITY_UNDEFINED); } public synchronized boolean setSinkPriority(BluetoothDevice device, int priority) { -- cgit v1.1