OSDN Git Service

Don't set priority in Bonding state.
authorJaikumar Ganesh <jaikumar@google.com>
Sat, 9 Jan 2010 02:26:14 +0000 (18:26 -0800)
committerJaikumar Ganesh <jaikumar@google.com>
Mon, 11 Jan 2010 22:16:29 +0000 (14:16 -0800)
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

index 8859339..1742e72 100644 (file)
@@ -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) {