Merge change 22870 into eclair

* changes:
  Set Routing to A2DP only when state is Connected.
This commit is contained in:
Android (Google) Code Review
2009-08-27 11:08:55 -07:00

View File

@@ -1381,7 +1381,8 @@ public class AudioService extends IAudioService.Stub {
address); address);
mConnectedDevices.remove(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP); mConnectedDevices.remove(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP);
} else if (!isConnected && } 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.setDeviceConnectionState(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP,
AudioSystem.DEVICE_STATE_AVAILABLE, AudioSystem.DEVICE_STATE_AVAILABLE,
address); address);