Merge "Check if the ANR dump is still ongoing before reporting it" into tm-dev am: f3dabda4b0 am: 133ab48a8f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18634945 Change-Id: I5af2c62af924c415120bb163c79d8db5ee11080c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -836,12 +836,18 @@ class AppErrors {
|
|||||||
report.type = ApplicationErrorReport.TYPE_CRASH;
|
report.type = ApplicationErrorReport.TYPE_CRASH;
|
||||||
report.crashInfo = crashInfo;
|
report.crashInfo = crashInfo;
|
||||||
} else if (errState.isNotResponding()) {
|
} 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.type = ApplicationErrorReport.TYPE_ANR;
|
||||||
report.anrInfo = new ApplicationErrorReport.AnrInfo();
|
report.anrInfo = new ApplicationErrorReport.AnrInfo();
|
||||||
|
|
||||||
report.anrInfo.activity = errState.getNotRespondingReport().tag;
|
report.anrInfo.activity = anrReport.tag;
|
||||||
report.anrInfo.cause = errState.getNotRespondingReport().shortMsg;
|
report.anrInfo.cause = anrReport.shortMsg;
|
||||||
report.anrInfo.info = errState.getNotRespondingReport().longMsg;
|
report.anrInfo.info = anrReport.longMsg;
|
||||||
}
|
}
|
||||||
|
|
||||||
return report;
|
return report;
|
||||||
|
|||||||
Reference in New Issue
Block a user