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

Commit 34e8ce24 authored by William Escande's avatar William Escande
Browse files

SystemServer: Remove un-necessary synchronize

All this code is running on a unique handler. The synchronize keyword is
coming from legacy and doesn't make sense anymore

Bug: 288450479
Test: m Bluetooth
Flag: Exempt trivial removal
Change-Id: Ib32abd5bba95e2670804e8dcfcf8555d21907407
parent f8aa188a
Loading
Loading
Loading
Loading
+15 −23
Original line number Diff line number Diff line
@@ -983,9 +983,7 @@ class BluetoothManagerService {
            Log.i(TAG, "enableBle: Bluetooth is already in state" + mState);
            return true;
        }
        synchronized (mReceiver) {
        sendEnableMsg(false, ENABLE_DISABLE_REASON_APPLICATION_REQUEST, packageName, true);
        }
        return true;
    }

@@ -1110,11 +1108,9 @@ class BluetoothManagerService {
            return false;
        }

        synchronized (mReceiver) {
        mQuietEnableExternal = true;
        mEnableExternal = true;
        sendEnableMsg(true, ENABLE_DISABLE_REASON_APPLICATION_REQUEST, packageName);
        }
        return true;
    }

@@ -1136,13 +1132,11 @@ class BluetoothManagerService {
            return false;
        }

        synchronized (mReceiver) {
        mQuietEnableExternal = false;
        mEnableExternal = true;
        AirplaneModeListener.notifyUserToggledBluetooth(
                mContentResolver, mCurrentUserContext, true);
        sendEnableMsg(false, ENABLE_DISABLE_REASON_APPLICATION_REQUEST, packageName);
        }
        return true;
    }

@@ -1159,7 +1153,6 @@ class BluetoothManagerService {
                        + (" isBinding=" + isBinding())
                        + (" mState=" + mState));

        synchronized (mReceiver) {
        AirplaneModeListener.notifyUserToggledBluetooth(
                mContentResolver, mCurrentUserContext, false);

@@ -1168,7 +1161,6 @@ class BluetoothManagerService {
        }
        mEnableExternal = false;
        sendDisableMsg(ENABLE_DISABLE_REASON_APPLICATION_REQUEST, packageName);
        }
        return true;
    }