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

Skip to content
Commit 62bfef80 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Execute transition by starting window of cold launch existed task

The check of wasTaskVisible was to make sure the transition ready is
only set once for a new launch, because onStartingWindowDrawn may be
called multiple times before drawState is commited.

But the task-has-been-visible won't be reset even if the process is
died because it is about whether the task has been appeared. So when
cold launching an existed task which had been visible from background,
the wasTaskVisible is true so the transition still waits until the
process attaches. The latency is even worse since
DEFAULT_ENABLE_WAIT_FOR_FINISH_ATTACH_APPLICATION is enabled, because
it defers attachApplication until the app completes bindApplication.

Because StartingData will be a new object per starting window, its
mIsDisplayed can be used to replace wasTaskVisible without being
restricted by the existence of task.

This may reduce >100ms cold launch transition latency of existed task.

Bug: 347404285
Flag: EXEMPT bugfix
Test: atest ActivityRecordTests#testOnStartingWindowDrawn
Test: Launch calculator. Return to home.
      "adb shell kill -9 $pid_of_calculator"
      Check the end timestamp of SyncGroupReady trace should not be
      at attachApplication of calculator.

Change-Id: I61c62eaa17cc613fcb94e291bc14846efb08e996
parent a1ff4c14
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment