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
Loading
Please register or sign in to comment