Skip to content
Commit 1d3084bb authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Consider process priority of unknown visibility launching app

When launching a show-when-locked activity on keyguard or switch
between show-when-locked activities while keyguard is locked, because
the activity visibility may be unknown before knowing whether it can
show on keyguard, the device may enter sleeping state before the
activity becomes visible. That causes the power mode and top process
state are lost during launching the app and slow down the launch time.

So add a new flag to indicate that if there are still unknown visibility
records, then keep the power mode and top process state. This may
improve 30% launch time for the cases.

Currently it only applies when the caller is no system ui because the
launch time may be affected by counting the time of double resume-stop
lifecycle depends on the timing of keyguard-going-away. And the case
should be addressed once keyguard remote animation is enabled in the
future, that will trigger keyguard-going-away earlier.

Bug: 197963579
Test: atest ActivityTaskManagerServiceTests#testUpdateSleep
Change-Id: If8beb4547be8dad3748474d0813729516f502798
parent 08774f2f
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