From c0cec6245429ef1c9617a710fe08b2999b329d08 Mon Sep 17 00:00:00 2001 From: Jaikumar Ganesh Date: Mon, 19 Apr 2010 17:19:31 -0700 Subject: Fix runtime reboot when connecting to a A2DP headset and user toggles BT state. Bug:2607218 This happens when Bluetooth is turned off, and when the headset is still trying to connect. We get the connection result of attempt before Bluetooth was toggled. We need to ignore this result. Change-Id: Icf0abeb3dfc794bb3371b1c427aa15755fbe84c7 --- core/java/android/server/BluetoothA2dpService.java | 1 + 1 file changed, 1 insertion(+) (limited to 'core/java/android/server') diff --git a/core/java/android/server/BluetoothA2dpService.java b/core/java/android/server/BluetoothA2dpService.java index 893db2e..ac89934 100644 --- a/core/java/android/server/BluetoothA2dpService.java +++ b/core/java/android/server/BluetoothA2dpService.java @@ -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); -- cgit v1.1