From 6309689e6c35e4aff116fe6b3c806bef52975e66 Mon Sep 17 00:00:00 2001 From: Jaikumar Ganesh Date: Wed, 6 Jan 2010 11:41:41 -0800 Subject: [PATCH] Fix media option settings for A2DP. Incoming connections move the A2DP state to Connecting before getting authorized, which messes up the priorities. Dr No: Eastham Bug: 2358414 --- core/java/android/server/BluetoothA2dpService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/java/android/server/BluetoothA2dpService.java b/core/java/android/server/BluetoothA2dpService.java index dfec1eb2a2b53..46145b967cdf1 100644 --- a/core/java/android/server/BluetoothA2dpService.java +++ b/core/java/android/server/BluetoothA2dpService.java @@ -463,7 +463,8 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub { mAudioManager.setParameters("A2dpSuspended=false"); } - if (state == BluetoothA2dp.STATE_CONNECTING || + if (getSinkPriority(device) > BluetoothA2dp.PRIORITY_OFF && + state == BluetoothA2dp.STATE_CONNECTING || state == BluetoothA2dp.STATE_CONNECTED) { // We have connected or attempting to connect. // Bump priority