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

Commit ed449455 authored by Brad Lassey's avatar Brad Lassey Committed by Android Build Coastguard Worker
Browse files

Broadcast to device lock state listeners inside a synchronized block

Bug: 379840278
Test: bug fix
Flag: EXEMPT bugfix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:49a495b53ea6554fb8860609268f754a2a6c9402)
Merged-In: Iebe4b51e1d5660b952a3ba390fbca07fb5fe962b
Change-Id: Iebe4b51e1d5660b952a3ba390fbca07fb5fe962b
parent 7cf442a6
Loading
Loading
Loading
Loading
+16 −14
Original line number Diff line number Diff line
@@ -2528,6 +2528,7 @@ public class TrustManagerService extends SystemService {
    }

    private void notifyDeviceLockedListenersForUser(int userId, boolean locked) {
        synchronized (mDeviceLockedStateListeners) {
            int numListeners = mDeviceLockedStateListeners.beginBroadcast();
            try {
                IntStream.range(0, numListeners).forEach(i -> {
@@ -2547,3 +2548,4 @@ public class TrustManagerService extends SystemService {
            }
        }
    }
}