am ccaebfc9: Don\'t set priority in Bonding state. This was causing A2DP get connected for Car Docks, when user didn\'t select it.

Merge commit 'ccaebfc9428aa7c167caf469f7393e1fb375307e' into eclair-plus-aosp

* commit 'ccaebfc9428aa7c167caf469f7393e1fb375307e':
  Don't set priority in Bonding state.
This commit is contained in:
Jaikumar Ganesh
2010-01-11 14:20:53 -08:00
committed by Android Git Automerger

View File

@@ -100,7 +100,6 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub {
setSinkPriority(device, BluetoothA2dp.PRIORITY_ON); setSinkPriority(device, BluetoothA2dp.PRIORITY_ON);
} }
break; break;
case BluetoothDevice.BOND_BONDING:
case BluetoothDevice.BOND_NONE: case BluetoothDevice.BOND_NONE:
setSinkPriority(device, BluetoothA2dp.PRIORITY_UNDEFINED); setSinkPriority(device, BluetoothA2dp.PRIORITY_UNDEFINED);
break; break;
@@ -400,7 +399,7 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub {
mContext.enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); mContext.enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission");
return Settings.Secure.getInt(mContext.getContentResolver(), return Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.getBluetoothA2dpSinkPriorityKey(device.getAddress()), Settings.Secure.getBluetoothA2dpSinkPriorityKey(device.getAddress()),
BluetoothA2dp.PRIORITY_OFF); BluetoothA2dp.PRIORITY_UNDEFINED);
} }
public synchronized boolean setSinkPriority(BluetoothDevice device, int priority) { public synchronized boolean setSinkPriority(BluetoothDevice device, int priority) {