am 2246bc54: am 6ff90cf2: Merge change 22870 into eclair

Merge commit '2246bc54fa82b7a2531deeb2ac9563d0e773dd03'

* commit '2246bc54fa82b7a2531deeb2ac9563d0e773dd03':
  Set Routing to A2DP only when state is Connected.
This commit is contained in:
Jaikumar Ganesh
2009-08-27 11:12:13 -07:00
committed by Android Git Automerger

View File

@@ -1381,7 +1381,8 @@ public class AudioService extends IAudioService.Stub {
address);
mConnectedDevices.remove(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP);
} else if (!isConnected &&
(state == BluetoothA2dp.STATE_CONNECTED || state != BluetoothA2dp.STATE_PLAYING)){
(state == BluetoothA2dp.STATE_CONNECTED ||
state == BluetoothA2dp.STATE_PLAYING)) {
AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP,
AudioSystem.DEVICE_STATE_AVAILABLE,
address);