am c0cec624: Fix runtime reboot when connecting to a A2DP headset and user toggles BT state.

This commit is contained in:
Jaikumar Ganesh
2010-05-04 15:57:45 -07:00
committed by Android Git Automerger

View File

@@ -554,6 +554,7 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub {
if (!result) {
if (deviceObjectPath != null) {
String address = mBluetoothService.getAddressFromObjectPath(deviceObjectPath);
if (address == null) return;
BluetoothDevice device = mAdapter.getRemoteDevice(address);
int state = getSinkState(device);
handleSinkStateChange(device, state, BluetoothA2dp.STATE_DISCONNECTED);