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

Skip to content
Commit 211e1dd8 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Keep visible requested for transient hide activities

If a process doesn't have other active component and its activity
is not visible requested, it will become background state and may
lose the access of various system services.

The invisible requested will also cause other animation issues
such as incorrect dim layer, window surface position. Because
isGoneForLayout will return false by the visible state.

By checking isTransientHide in TaskFragment#getVisibility,
the task can keep visible even if it is occluded by the transient
launch target. And then add FLAG_ABOVE_TRANSIENT_LAUNCH to the
tree of transient-hide task so the ChangeInfo will always report
as TRANSIT_TO_BACK.

When the transient transition is finished, if the transient launch
target is visible, then update the visibility to make the
transient-hide activities to be invisible requested and add the
activities to stopping list. So when checking the visibility
participants, it can continue to commit the state.

Also add a condition for mAvoidMoveToFront for the case that the
moving-to-back task may be moved to front again after transient
launch if the app uses a trampoline activity.
- Previously during the transient transition, the trampoline launch
  will be blocked by BAL because invisible.
- In legacy transition, the task is already on top (recent is
  launch-behind) and finish-recents-animation will move home to front.
Now it will launch the new activity into its task without moving
the task to front, e.g. during the swipe-return-to-home animation,
the going-to-invisible activity launches next activity, it will
still stay at home. And then launch the app again, the latest
new activity on its task can be resumed directly.

Fix: 269577449
Fix: 271282193
Test: atest TransitionTests#testTransientLaunch
Change-Id: I887f63a4985804a59e6602817dce6aec0e6f2c69
parent 4893b904
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