summaryrefslogtreecommitdiffstats
path: root/core/java/android/server
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:28:27 -0700
commit55b0110fc298c403887b1311d7eabfffa230495f (patch)
tree60e067c2acda0e8f48570f482b7395abd7c77868 /core/java/android/server
parent8d30b2d284fee002242dd412ddda39ce91845faf (diff)
downloadframeworks_base-55b0110fc298c403887b1311d7eabfffa230495f.zip
frameworks_base-55b0110fc298c403887b1311d7eabfffa230495f.tar.gz
frameworks_base-55b0110fc298c403887b1311d7eabfffa230495f.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: I023406ec6d59880754ca4f1de676d0dce71b13c6
Diffstat (limited to 'core/java/android/server')
-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);