diff options
| author | Jaikumar Ganesh <jaikumar@google.com> | 2009-08-26 19:42:09 -0700 |
|---|---|---|
| committer | Jaikumar Ganesh <jaikumar@google.com> | 2009-08-27 11:03:00 -0700 |
| commit | 78333dd750c7353e47163407a662ef39a3c6b24a (patch) | |
| tree | 00a6ef10d6ec1a753e6d14656bef48dadfc2bfbd /media/java | |
| parent | 1b856974617cb88202cdfe28bdcf43a939fa47be (diff) | |
| download | frameworks_base-78333dd750c7353e47163407a662ef39a3c6b24a.zip frameworks_base-78333dd750c7353e47163407a662ef39a3c6b24a.tar.gz frameworks_base-78333dd750c7353e47163407a662ef39a3c6b24a.tar.bz2 | |
Set Routing to A2DP only when state is Connected.
We were setting the routing to A2DP when the state was Connecting too.
This was incorrect and can cause problems. One such problem was when
handling an incoming connection we set the routing to A2DP before
authorization. And even if authorization succeeds we get out sync with
AVDTP command state.
Diffstat (limited to 'media/java')
| -rw-r--r-- | media/java/android/media/AudioService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java index d1b9351..754d5a2 100644 --- a/media/java/android/media/AudioService.java +++ b/media/java/android/media/AudioService.java @@ -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); |
