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

Commit 26a735bb authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Add lock in sendBluetoothServiceUpCallback"

parents 9c7354e5 55b988eb
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1918,6 +1918,7 @@ public class BluetoothManagerService extends IBluetoothManager.Stub {
     */
    private void sendBluetoothServiceUpCallback() {
        synchronized (mCallbacks) {
            mBluetoothLock.readLock().lock();
            try {
                int n = mCallbacks.beginBroadcast();
                Log.d(TAG, "Broadcasting onBluetoothServiceUp() to " + n + " receivers.");
@@ -1930,6 +1931,7 @@ public class BluetoothManagerService extends IBluetoothManager.Stub {
                }
            } finally {
                mCallbacks.finishBroadcast();
                mBluetoothLock.readLock().unlock();
            }
        }
    }