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.
This commit is contained in:
Jaikumar Ganesh
2010-03-02 17:19:20 -08:00
parent b5e15690dc
commit 081a9b69a7

View File

@@ -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) {