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

Skip to content
Commit c46c161f authored by Hall Liu's avatar Hall Liu
Browse files

Fix locking for BluetoothDeviceManager

Lock on BluetoothDeviceManager's lock when fetching a list of available
devices. The previous implementation failed to take into account that
the return value of HashMap#values() is a view into the map, and
therefore can't be read while the base map is modified.

Fix is to create a copy of the list while still inside the synchronized
block. Also add a few more locks around the hashmap.

Change-Id: I336618a4cd42d74a70bad9c2075ea4de89a35240
Fixes: 110411424
Test: manual testing, unit tests
parent 87c0eaff
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment