summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2010-03-02 17:19:20 -0800
committerJaikumar Ganesh <jaikumar@google.com>2010-03-02 17:19:20 -0800
commit081a9b69a79ad16093122002b27320b23ac656e1 (patch)
treeb339243f34a2abc29280e893bde855720dd71a96
parentb5e15690dc9a21435c378cc73234d0a324f6eee8 (diff)
downloadframeworks_base-081a9b69a79ad16093122002b27320b23ac656e1.zip
frameworks_base-081a9b69a79ad16093122002b27320b23ac656e1.tar.gz
frameworks_base-081a9b69a79ad16093122002b27320b23ac656e1.tar.bz2
Remove UUIDs from the cache when the device is unpaired.
This fixes one probable case of A2DP profile connection state hanging in connecting state. When the device is unpaired and repaired, before the drivers are up on the bluez side, settings app / auto-connect code can try to connect.
-rw-r--r--core/java/android/server/BluetoothEventLoop.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/server/BluetoothEventLoop.java b/core/java/android/server/BluetoothEventLoop.java
index b28cf43..f363828 100644
--- a/core/java/android/server/BluetoothEventLoop.java
+++ b/core/java/android/server/BluetoothEventLoop.java
@@ -274,9 +274,11 @@ class BluetoothEventLoop {
private void onDeviceRemoved(String deviceObjectPath) {
String address = mBluetoothService.getAddressFromObjectPath(deviceObjectPath);
- if (address != null)
+ if (address != null) {
mBluetoothService.getBondState().setBondState(address.toUpperCase(),
BluetoothDevice.BOND_NONE, BluetoothDevice.UNBOND_REASON_REMOVED);
+ mBluetoothService.setRemoteDeviceProperty(address, "UUIDs", null);
+ }
}
/*package*/ void onPropertyChanged(String[] propValues) {