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