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

Commit ca66babd authored by Ajay Kumar's avatar Ajay Kumar Committed by Linux Build Service Account
Browse files

Bluetooth: GAP: Added syncronization lock in Getdevice method

Library function in getdevice method accessed without syncronization
lock from bondStateChangeCallback and sspRequestCallback

Change-Id: If0ee704b6d86ff15c82c5fac09df80229c5c01fc
CRs-fixed: 746150
parent e68ba26f
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -100,11 +100,13 @@ final class RemoteDevices {
    }

    BluetoothDevice getDevice(byte[] address) {
        synchronized (mDevices) {
            for (BluetoothDevice dev : mDevices.keySet()) {
                if (dev.getAddress().equals(Utils.getAddressStringFromByte(address))) {
                    return dev;
                }
            }
        }
        return null;
    }