summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2010-04-19 17:19:31 -0700
committerJaikumar Ganesh <jaikumar@google.com>2010-05-04 15:56:11 -0700
commitc0cec6245429ef1c9617a710fe08b2999b329d08 (patch)
tree2fb54d56c9562a29925306603f859fc8f104c808 /core
parentca4d4de865701bac74d087c47cb6c35ce1946fd9 (diff)
downloadframeworks_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')
-rw-r--r--core/java/android/server/BluetoothA2dpService.java1
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);