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

Commit 801cb6ed authored by Brad Lassey's avatar Brad Lassey
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

NOTE FOR REVIEWERS - errors occurred while applying the patch.
PLEASE REVIEW CAREFULLY.
Errors:
Error applying patch in services/core/java/com/android/server/trust/TrustManagerService.java, hunk HunkHeader[2528,22->2528,24]: Hunk cannot be applied

Original patch:
 From 49a495b5 Mon Sep 17 00:00:00 2001
From: Brad Lassey <lassey@google.com>
Date: Thu, 21 Nov 2024 14:43:32 -0500
Subject: [PATCH] Broadcast to device lock state listeners inside a synchronized block

Bug: 379840278
Test: bug fix
Flag: EXEMPT bugfix
Change-Id: Iebe4b51e1d5660b952a3ba390fbca07fb5fe962b
---
parent f44dc885
Loading
Loading
Loading
Loading
+16 −14
Original line number Diff line number Diff line
@@ -2511,6 +2511,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 -> {
@@ -2530,3 +2531,4 @@ public class TrustManagerService extends SystemService {
            }
        }
    }
}