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

Commit 52d864fd authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add lock in sendBluetoothServiceUpCallback" am: 26a735bb am: 3e53364b

parents 6c138c95 3e53364b
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();
            }
        }
    }