Merge "Fix ANR due to long wait for synchronization lock" am: 9193014ee6
am: ad4e3c5d8b
Change-Id: Ib145ddd3769145f19387b438b55eaf495894ef4f
This commit is contained in:
9
packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothAdapter.java
Executable file → Normal file
9
packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothAdapter.java
Executable file → Normal file
@@ -194,8 +194,13 @@ public class LocalBluetoothAdapter {
|
||||
return mState;
|
||||
}
|
||||
|
||||
synchronized void setBluetoothStateInt(int state) {
|
||||
mState = state;
|
||||
void setBluetoothStateInt(int state) {
|
||||
synchronized(this) {
|
||||
if (mState == state) {
|
||||
return;
|
||||
}
|
||||
mState = state;
|
||||
}
|
||||
|
||||
if (state == BluetoothAdapter.STATE_ON) {
|
||||
// if mProfileManager hasn't been constructed yet, it will
|
||||
|
||||
Reference in New Issue
Block a user