diff options
| author | Jing Ji <jji@google.com> | 2022-05-28 04:37:37 +0000 |
|---|---|---|
| committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-05-28 04:37:37 +0000 |
| commit | f214283f59dce1331064e7d6ba14bbd4eaeb2410 (patch) | |
| tree | 13c271c7b27d26aab49d8744cee5a7fcf688d4c6 | |
| parent | 12be0287a710a144b69db42a7b68b783e63c3dad (diff) | |
| parent | 44592782d5cd21d2e560591a4992ea3b463a0ec3 (diff) | |
Merge "Check if the ANR dump is still ongoing before reporting it" into tm-dev am: f3dabda4b0 am: 44592782d5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18634945
Change-Id: I1ac0abd36bb4c733eb61a3cae975e9e0bea79038
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | services/core/java/com/android/server/am/AppErrors.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/am/AppErrors.java b/services/core/java/com/android/server/am/AppErrors.java index ed492bc7344c..08c1de61d7fb 100644 --- a/services/core/java/com/android/server/am/AppErrors.java +++ b/services/core/java/com/android/server/am/AppErrors.java @@ -836,12 +836,18 @@ class AppErrors { report.type = ApplicationErrorReport.TYPE_CRASH; report.crashInfo = crashInfo; } else if (errState.isNotResponding()) { + final ActivityManager.ProcessErrorStateInfo anrReport = + errState.getNotRespondingReport(); + if (anrReport == null) { + // The ANR dump is still ongoing, ignore it for now. + return null; + } report.type = ApplicationErrorReport.TYPE_ANR; report.anrInfo = new ApplicationErrorReport.AnrInfo(); - report.anrInfo.activity = errState.getNotRespondingReport().tag; - report.anrInfo.cause = errState.getNotRespondingReport().shortMsg; - report.anrInfo.info = errState.getNotRespondingReport().longMsg; + report.anrInfo.activity = anrReport.tag; + report.anrInfo.cause = anrReport.shortMsg; + report.anrInfo.info = anrReport.longMsg; } return report; |
