am 663ec308: Fix issue 2361949: A2DP suspend parameters set wrongly.

Merge commit '663ec308801a34de82db9ab993f0e906da690f89' into eclair-plus-aosp

* commit '663ec308801a34de82db9ab993f0e906da690f89':
  Fix issue 2361949: A2DP suspend parameters set wrongly.
This commit is contained in:
Eric Laurent
2010-01-08 12:17:08 -08:00
committed by Android Git Automerger
2 changed files with 2 additions and 4 deletions

View File

@@ -459,10 +459,6 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub {
checkSinkSuspendState(state);
mTargetA2dpState = -1;
if (state == BluetoothA2dp.STATE_CONNECTING) {
mAudioManager.setParameters("A2dpSuspended=false");
}
if (getSinkPriority(device) > BluetoothA2dp.PRIORITY_OFF &&
state == BluetoothA2dp.STATE_CONNECTING ||
state == BluetoothA2dp.STATE_CONNECTED) {

View File

@@ -1438,6 +1438,8 @@ public class AudioService extends IAudioService.Stub {
AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP,
AudioSystem.DEVICE_STATE_AVAILABLE,
address);
// Reset A2DP suspend state each time a new sink is connected
AudioSystem.setParameters("A2dpSuspended=false");
mConnectedDevices.put( new Integer(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP),
address);
}