Fix excessive locking synchronization leading to deadlocks.
We should never have to look on the entire instance. There are many places in the code where it there and we need to fix it. This is a start. In this particular case what we are protecting is the properties map of the remote device and thus we just need to lock on it. Ofcourse, it would be better to have a state machine but this is good for now. Deadlock: When a new device was found it will call addProperties which will hold a lock. addProperties calls into BluetoothService. Now Settings app makes a call into BluetoothService which will call into this file and we have a deadlock. Change-Id: Ieb69d5ace222bf5d1e6677af151241153303099f
Loading
Please register or sign in to comment