[PiP2] Handle enter PiP and display change in sync
Sometimes enter PiP transition can also collect the display change which would not be hitting the traditional fixed-rotation case. This happens when TRANSIT_PIP is collecting and display change is also happening in Core, in which case a separate IDisplayChangeWindowControllerImpl channel is used to dispatch onDisplayChange callbacks. This means these onDisplayChange() callbacks can come in after startWCT was sent to Core, but before we start animating the transition. So what we can do is recognize this and update the Shell-side PiP bounds state as needed, fake animate PiP in the desired destination bounds when the transition arrives to be played, and then kick off a jumpcut bounds change transition to restore the WM bounds as well. This happens 100% of the time when entering PiP by tapping elsewhere in overview from landscape with the resumed activity supporting auto-enter PiP. Bug: 381186732 Flag: com.android.wm.shell.enable_pip2 Test: tap elsewhere in Overview with PiP-able activity resumed in landscape Change-Id: Idc9e9b6d2783e5ab1887a5b436682054851d46ea
Loading
Please register or sign in to comment