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

Commit 8a337976 authored by Prabir Pradhan's avatar Prabir Pradhan
Browse files

Hold global lock when calling dumpAnrStateLocked

Bug: 233890533
Test: Presubmit
Change-Id: I2fed92014082938db5f2e9ded23d11023c75ebd7
parent ff3ab034
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -135,8 +135,10 @@ class AnrController {
     * Notify a window owned by the provided pid was unresponsive.
     */
    private void notifyWindowUnresponsive(int pid, String reason) {
        synchronized (mService.mGlobalLock) {
            Slog.i(TAG_WM, "ANR in input window owned by pid=" + pid + ". Reason: " + reason);
            dumpAnrStateLocked(null /* activity */, null /* windowState */, reason);
        }

        // We cannot determine the z-order of the window, so place the anr dialog as high
        // as possible.