Move dumpAnrStateAsync calls after inputDispatchingTimedOut and update the durations array
Reorder the calls to dumpAnrStateAsync, placing them after the execution of ActivityManagerService.InputDispatchingTimedOut.
This adjustment prevents a potential race condition that could cause a significant delay in inputDispatchingTimedOut
(and consequently, the generation of the first core dump in the ANR). By making this change, we ensure that the global window
lock is held first by inputDispatchingTimedOut (in the call to WindowProcessController.getInputDispatchingTimeoutMillis)
Test: Tested manually
Bug: 272292150
Change-Id: If48a9e5e3af38cabe618750b7989318af3fd75c4
2 files changed