From 081a9b69a79ad16093122002b27320b23ac656e1 Mon Sep 17 00:00:00 2001 From: Jaikumar Ganesh Date: Tue, 2 Mar 2010 17:19:20 -0800 Subject: 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. --- core/java/android/server/BluetoothEventLoop.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) { -- cgit v1.1