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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user