Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3deead7f authored by Himanshu Rawat's avatar Himanshu Rawat Committed by Automerger Merge Worker
Browse files

Null-check device properties when removing the address mapping am: b388022d am: 03d3f2bb

parents 2524517b 03d3f2bb
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -1247,6 +1247,7 @@ public class RemoteDevices {
        String address = device.getAddress();
        if (Flags.temporaryPairingDeviceProperties() && oldState != BluetoothDevice.BOND_BONDED) {
            DeviceProperties deviceProperties = mDevices.get(address);
            if (deviceProperties != null) {
                int leConnectionHandle =
                        deviceProperties.getConnectionHandle(BluetoothDevice.TRANSPORT_LE);
                int bredrConnectionHandle =
@@ -1257,6 +1258,7 @@ public class RemoteDevices {
                    return;
                }
            }
        }

        if (Flags.removeAddressMapOnUnbond() && newState == BluetoothDevice.BOND_NONE) {
            removeAddressMapping(address);