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

Commit 0ad0a5f3 authored by Suprabh Shukla's avatar Suprabh Shukla
Browse files

Add kill reason and subreason to trace slice

Test: Manually inspect a trace

Flag: EXEMPT log only update

Fixes: 433368077
Change-Id: Ie042a00cd8d6b842f88ca5147bb44dbbfe65e99c
parent 8441f07f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1300,7 +1300,10 @@ class ProcessRecord extends ProcessRecordInternal implements WindowProcessListen
    void killLocked(String reason, String description, @Reason int reasonCode,
            @SubReason int subReason, boolean noisy, boolean asyncKPG) {
        if (!mKilledByAm) {
            Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "kill");
            if (Trace.isTagEnabled(Trace.TRACE_TAG_ACTIVITY_MANAGER)) {
                Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER,
                        "kill/" + processName + "/" + reasonCode + "/" + subReason);
            }
            if (reasonCode == ApplicationExitInfo.REASON_ANR
                    && mErrorState.getAnrAnnotation() != null) {
                description = description + ": " + mErrorState.getAnrAnnotation();