Handle launch time while device is sleeping
The major case is to launch activity from keyguard. The activity
can be invisible until the keyguard is gone. Because it is unknown
that whether the activity will be visible, this change skips the
cancellation of launch time tracker if visibility is changed when
launching. And if after 3s, there are still no activity will be
drawn, the tracker will be canceled (to avoid endless trace).
Fixes: 183726381
Test: atest ActivityMetricsLaunchObserverTests# \
testOnActivityLaunchWhileSleeping
Change-Id: Ic590ad75de987d40814dc233f36a53a72386091c
2 files changed