am 6ff90cf2: Merge change 22870 into eclair

Merge commit '6ff90cf2b3148b51e6f900e2e86bcd1a2afb26d7' into eclair-plus-aosp

* commit '6ff90cf2b3148b51e6f900e2e86bcd1a2afb26d7':
  Set Routing to A2DP only when state is Connected.
This commit is contained in:
Jaikumar Ganesh
2009-08-27 11:10:16 -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);