Avoid canceling WaitInfo by trampoline activity
An invisible trampoline activity may not animate, so it may be
destroyed earlier than the next activity launched by the trampoline.
If the WaitInfo aborts by matching the component name of the
trampoline when it is destroyed, the launch time becomes unknown.
The case happens when the trampoline activity and the next main
activity are in different tasks. Because both the activity and its
parent are not animating, it will be scheduled to destroy.
Also keep invisible initializing pending drawn records when the
transition is started, because it depends on the drawn time of
starting window, the next activity may not yet update visibility.
Bug: 193112389
Test: AmStartOptionsTests
ActivityTaskSupervisorTests# \
testReportWaitingActivityLaunched
ActivityMetricsLaunchObserverTests# \
testDoNotCountInvisibleActivityToBeDrawn
Change-Id: I53c2aa6fd604bb12d539176296663a40ba762d22
4 files changed