diff options
author | Jaikumar Ganesh <jaikumar@google.com> | 2010-04-19 17:19:31 -0700 |
---|---|---|
committer | Jaikumar Ganesh <jaikumar@google.com> | 2010-05-04 15:56:11 -0700 |
commit | c0cec6245429ef1c9617a710fe08b2999b329d08 (patch) | |
tree | 2fb54d56c9562a29925306603f859fc8f104c808 /core/java | |
parent | ca4d4de865701bac74d087c47cb6c35ce1946fd9 (diff) | |
download | frameworks_base-c0cec6245429ef1c9617a710fe08b2999b329d08.zip frameworks_base-c0cec6245429ef1c9617a710fe08b2999b329d08.tar.gz frameworks_base-c0cec6245429ef1c9617a710fe08b2999b329d08.tar.bz2 |
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
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/server/BluetoothA2dpService.java | 1 |
1 files changed, 1 insertions, 0 deletions
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); |