Fix A2DP connection problem, if disconnected while playing music.

Change-Id: I594564c11dc1698f00f9db3e6f6e4f8da9e2fe69
This commit is contained in:
Jaikumar Ganesh
2010-10-26 11:22:48 -07:00
parent 8febf88618
commit b2ec4fa8d7

View File

@@ -498,6 +498,7 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub {
handleSinkPlayingStateChange(device, BluetoothA2dp.STATE_NOT_PLAYING,
BluetoothA2dp.STATE_PLAYING);
} else {
mPlayingA2dpDevice = null;
int prevState = mAudioDevices.get(device);
handleSinkStateChange(device, prevState, state);
}
@@ -512,7 +513,6 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub {
mSinkCount--;
} else if (state == BluetoothA2dp.STATE_CONNECTED) {
mSinkCount ++;
mPlayingA2dpDevice = null;
}
mAudioDevices.put(device, state);