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

Commit 046b82e9 authored by Ioannis Ilkos's avatar Ioannis Ilkos Committed by Android (Google) Code Review
Browse files

Merge "Revert "Revert "Add launch type in activity startup trace"""

parents 36143477 26113c7b
Loading
Loading
Loading
Loading
+15 −3
Original line number Original line Diff line number Diff line
@@ -237,9 +237,21 @@ class ActivityMetricsLogger {
            if (mAssociatedTransitionInfo == null) {
            if (mAssociatedTransitionInfo == null) {
                launchResult = ":failed";
                launchResult = ":failed";
            } else {
            } else {
                launchResult = (abort ? ":canceled:" : mAssociatedTransitionInfo.mProcessSwitch
                final String status;
                        ? ":completed:" : ":completed-same-process:")
                if (abort) {
                        + mAssociatedTransitionInfo.mLastLaunchedActivity.packageName;
                    status = ":canceled:";
                } else if (!mAssociatedTransitionInfo.mProcessSwitch) {
                    status = ":completed-same-process:";
                } else {
                    if (endInfo.mTransitionType == TYPE_TRANSITION_HOT_LAUNCH) {
                        status = ":completed-hot:";
                    } else if (endInfo.mTransitionType == TYPE_TRANSITION_WARM_LAUNCH) {
                        status = ":completed-warm:";
                    } else {
                        status = ":completed-cold:";
                    }
                }
                launchResult = status + mAssociatedTransitionInfo.mLastLaunchedActivity.packageName;
            }
            }
            // Put a supplement trace as the description of the async trace with the same id.
            // Put a supplement trace as the description of the async trace with the same id.
            Trace.instant(Trace.TRACE_TAG_ACTIVITY_MANAGER, mTraceName + launchResult);
            Trace.instant(Trace.TRACE_TAG_ACTIVITY_MANAGER, mTraceName + launchResult);