Move config-at-end seamless-flip to activity-level
The current setup was made to sorta match pip1 in the sense that the config-at-end task and activity surfaces remain untouched and shell does a "forward" animation (ie. it animates from identity to a transformed state) and then WM flips the content and the surface transform together at the *end* of the animation. The issue, here, is that it means there is a period of time where WM is manipulating surfaces (Task-level) that Shell technically "owns" and without any synchronization mechanism: this means shell can't synchronize updates to it's overlay and also must somehow prevent user interaction with the surface while WM is messing with it; however, WM never tells Shell when it is done. Instead of making the sync/communication more complicated (and error-prone), we move the content/transform-flipping to the Activity-level (which WM "owns"). This changes the dynamics such that shell is now responsible for a "catch-up" animation (ie. animating from a "reverse transformed" state into the current state). The benefits are: * Works like other transitions now (which also do catch-up). * WM only manipulates surfaces that it "owns" * Synchronization is now only on start (like other transitions). * No need to bubble-up CONFIG_AT_END flag. We still keep the old behavior for activity-level because there's really no other way to do it -- but activity-level doesn't have the same issues as task because it is only loaned to shell for the animation. Bug: 202201326 Test: atest TransitionTests#testConfigAtEnd Flag: com.android.wm.shell.enable_pip2 Change-Id: Ice26e2414772555fae577ce517a8892634e716da
Loading
Please register or sign in to comment