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

Skip to content
Commit 0ed7489e authored by Ikram Gabiyev's avatar Ikram Gabiyev
Browse files

[1/2][PiP2] Move removePip animation to transition

PiP1 currently relies on force-hideen flag to guarantee
the order of onStop() and onPictureInPictureModeChanged()
callbacks being sent to client. Therefore, PiP1 first runs
the fade-out animation separately before starting a jumpcut
removePip transition.

In PiP2, we wanna avoid synchronization issues through moving
deterministic animations into transitions. Hence, we wanna run
the fadeout animation while the TRANSIT_REMOVE_PIP is playing.

1. This means we should not rely on force-hidden flag in PiP2,
as that would stop activity immediately before we even start fade-out

2. Currently setting windowing mode, which updates config in Core,
also ends up scheduling PiP mode change directly. Long-term we shouldn't
have this direct scheduling done, as a transition will make sure to
update and send config and lifecycle state updates at the right time
(in this case isVisibleRequested=false -> so finishTransition would
handle it). We opt to use a simpler in-Shell workaround for now by using
deferConfigAtEnd, to pause the dispatch of config till transition is
over.

Bug: 381017000
Flag: com.android.wm.shell.enable_pip2
Test: atest PipSchedulerTest
Test: atest PinnedStackTests#testStopBeforeMultiWindowCallbacksOnDismiss
Change-Id: I94783796ebc470c1d500510e577b0c0e9de91b9c
parent bfea8348
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