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

Skip to content
Commit 44088155 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. 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).

Bug: 381017000
Flag: com.android.wm.shell.enable_pip2
Test: atest PipSchedulerTest
Test: atest PinnedStackTests#testStopBeforeMultiWindowCallbacksOnDismiss
Test: atest SwipeUpAppToPipTestsChrome#testSwipeUpToPipForMocked

Change-Id: Ic1698f273257d63aebd07dda1881d2c2afa7f516
parent 48b4b671
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