Merge "Hold global lock when calling dumpAnrStateLocked"

This commit is contained in:
Prabir Pradhan
2022-07-26 18:55:05 +00:00
committed by Android (Google) Code Review

View File

@@ -135,8 +135,10 @@ class AnrController {
* Notify a window owned by the provided pid was unresponsive.
*/
private void notifyWindowUnresponsive(int pid, String reason) {
Slog.i(TAG_WM, "ANR in input window owned by pid=" + pid + ". Reason: " + reason);
dumpAnrStateLocked(null /* activity */, null /* windowState */, 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.