Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12c34fa8 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "BT: Limiting the thread lock to critical part of state update"

parents 43ff3982 34c69cb3
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -186,8 +186,13 @@ public final class LocalBluetoothAdapter {
        return mState;
    }

    synchronized void setBluetoothStateInt(int 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