summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jing Ji <jji@google.com> 2022-05-28 05:00:18 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-05-28 05:00:18 +0000
commit244ec43a2d8deaa7cfbba7abf79f9d1353b3e1fe (patch)
tree68c5b0412979f3b8adafe55d62e214745485e01b
parent577d148a9def2c19b1e27f752d06c06ea8f06d60 (diff)
parentf214283f59dce1331064e7d6ba14bbd4eaeb2410 (diff)
Merge "Check if the ANR dump is still ongoing before reporting it" into tm-dev am: f3dabda4b0 am: 44592782d5 am: f214283f59
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18634945 Change-Id: Ifc0ac126dc352411eb0b709828f3cf219ef3e236 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.java12
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;