Fix deadlock of mObject and mDevices in RemoteDevices

In RemoteDevices.java, the object mObject and mDevices are used
for synchronized, but there are some cases that two threads come
into deadlock between mObject and mDevices. This solution makes
sure that the thread of devicePropertyChangedCallback does not
require two objects at a same time to avoid the deadlock.

Fixes: 78784797
Test: Compile; unable to trigger race condition reliably
Change-Id: I0987ca9cd29d363faa3b43b7844db675401ef354
Signed-off-by: zhoutengteng <zhoutengteng@xiaomi.com>
1 file changed