Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c2f7b06 authored by Jing Ji's avatar Jing Ji Committed by Automerger Merge Worker
Browse files

Merge "Check if the ANR dump is still ongoing before reporting it" into tm-dev...

Merge "Check if the ANR dump is still ongoing before reporting it" into tm-dev am: f3dabda4 am: 692c6cb1

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18634945



Change-Id: If9484ac6d51eca27bc46a8fc50f8f7e12791bd78
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 26ebcb25 692c6cb1
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -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;