[PiP on Desktop] Fix PiP issues with multiple_desktops_backend flag
This CL fixes a few issues with multi-activity PiP when the multiple_desktops_backend flag is enabled. - Instead of wct.reorder, the parent task for the multi-activity PiP needs to be minimized instead. In addition, when expanding PiP, the parent/original task then needs to be unminimized. - With the flag enabled, the child task that is newly created for the PiP window is reparented to the DeskRoot in Task#validateRootTask. When InputMonitor updates the input consumer for the PiP window, the root task's bounds are used, which ends up being fullscreen in this case, causing PiP to consume input on the entire screen. This CL removes the initial Builder#setParent call and adds a TaskDisplayArea#addChild call after build() is called to ensure the new pinned task is added to the TDA. Bug: 419621266 Bug: 419908475 Bug: 421205793 Test: atest DesktopTasksControllerTest DesktopPipTransitionControllerTest Test: atest WMShellUnitTests:com.android.wm.shell.pip2 Test: atest WMShellUnitTests:com.android.wm.shell.pip Test: atest WMShellUnitTests:com.android.wm.shell.common.pip Test: Manual - launch ApiDemos in Desktop session and verify entering PiP and expanding is WAI, and PiP window is only consuming input within its bounds. Also verify that expanding PiP is WAI. Test: Manual - launch ApiDemos in CD with empty desk. Verify PiP enters on minimize and expanding PiP is WAI. Flag: com.android.window.flags.enable_desktop_windowing_pip Change-Id: I36971db0f86dec8312ba42d6b2ab60ba0c6e0e42
Loading
Please register or sign in to comment