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

Skip to content
Commit 31d7ee18 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Reduce ambiguity of trace from intent to launch activity

Because the launching activities can be floating/translucent/
in different displays/in multiple window mode, there could be
multiple launching traces at the same time.

The trace processor relied on
"MetricsLogger:launchObserverNotifyIntentStarted" and
"MetricsLogger:launchObserverNotifyActivityLaunchFinished",
which didn't provide enough information to know which startup
it belongs to.

With keeping the old trace for migrating, a new async trace is
added: launchingActivity#$seqId. It has the same meaning as
the "Android App startups" by trace processor. And there will
be another trace when the launch is done to indicate the result.
E.g.
 Activity not found:
   launchingActivity#1:failed
 Becomes invisible before reporting drawn:
   launchingActivity#1:canceled:the.pkg.name
 Successful shown:
   launchingActivity#1:completed:the.pkg.name

So the trace processor can search "launchingActivity#$id:completed:"
to get the launched package name and associate "launchingActivity#$id"
to show directly.

Bug: 222576471
Test: Launch an app with
      "external/perfetto/tools/record_android_trace am".

Change-Id: Ifa78e04f79605db27d7fd2a5f582d286ceae2a13
parent b1c7853e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment