Loading android/app/src/com/android/bluetooth/btservice/BondStateMachine.java +1 −1 Original line number Diff line number Diff line Loading @@ -489,7 +489,7 @@ final class BondStateMachine extends StateMachine { return; } mRemoteDevices.onBondStateChange(device, newState); mRemoteDevices.onBondStateChange(device, oldState, newState); if (devProp != null) { oldState = devProp.getBondState(); Loading android/app/src/com/android/bluetooth/btservice/RemoteDevices.java +16 −2 Original line number Diff line number Diff line Loading @@ -1243,9 +1243,23 @@ public class RemoteDevices { } } void onBondStateChange(BluetoothDevice device, int newState) { void onBondStateChange(BluetoothDevice device, int oldState, int newState) { String address = device.getAddress(); if (Flags.temporaryPairingDeviceProperties() && oldState != BluetoothDevice.BOND_BONDED) { DeviceProperties deviceProperties = mDevices.get(address); int leConnectionHandle = deviceProperties.getConnectionHandle(BluetoothDevice.TRANSPORT_LE); int bredrConnectionHandle = deviceProperties.getConnectionHandle(BluetoothDevice.TRANSPORT_BREDR); if (leConnectionHandle != BluetoothDevice.ERROR || bredrConnectionHandle != BluetoothDevice.ERROR) { // Device still connected, wait for disconnection to remove the properties return; } } if (Flags.removeAddressMapOnUnbond() && newState == BluetoothDevice.BOND_NONE) { removeAddressMapping(device.getAddress()); removeAddressMapping(address); } } Loading Loading
android/app/src/com/android/bluetooth/btservice/BondStateMachine.java +1 −1 Original line number Diff line number Diff line Loading @@ -489,7 +489,7 @@ final class BondStateMachine extends StateMachine { return; } mRemoteDevices.onBondStateChange(device, newState); mRemoteDevices.onBondStateChange(device, oldState, newState); if (devProp != null) { oldState = devProp.getBondState(); Loading
android/app/src/com/android/bluetooth/btservice/RemoteDevices.java +16 −2 Original line number Diff line number Diff line Loading @@ -1243,9 +1243,23 @@ public class RemoteDevices { } } void onBondStateChange(BluetoothDevice device, int newState) { void onBondStateChange(BluetoothDevice device, int oldState, int newState) { String address = device.getAddress(); if (Flags.temporaryPairingDeviceProperties() && oldState != BluetoothDevice.BOND_BONDED) { DeviceProperties deviceProperties = mDevices.get(address); int leConnectionHandle = deviceProperties.getConnectionHandle(BluetoothDevice.TRANSPORT_LE); int bredrConnectionHandle = deviceProperties.getConnectionHandle(BluetoothDevice.TRANSPORT_BREDR); if (leConnectionHandle != BluetoothDevice.ERROR || bredrConnectionHandle != BluetoothDevice.ERROR) { // Device still connected, wait for disconnection to remove the properties return; } } if (Flags.removeAddressMapOnUnbond() && newState == BluetoothDevice.BOND_NONE) { removeAddressMapping(device.getAddress()); removeAddressMapping(address); } } Loading