[PiP on CD] Only allow 1 PiP across multiple displays.
When a PiP transition is started, Core checks whether there is an existing PiP and remove it when necessary in RootWindowContainer#moveActivityToPinnedRootTaskInner. Previously, the code only checks for an existing PiP in the current TaskDisplayArea, but for PiP in Connected Displays, we want to check across displays to ensure we only have 1 PiP. This CL calls removeRootTasksInWindowingMode(WINDOWING_MODE_PINNED) directly if the Pip2 flag is enabled. Bug: 397769346 Test: atest PipDesktopStateTest Test: Manual - start PiP on first display, then start PiP on second display. Verify first PiP is removed, and second PiP is WAI Test: Manual - start PiP, then back navigation on second app to start PiP on the same display. Verify first PiP is removed, and second PiP is WAI Flag: com.android.window.flags.enable_connected_displays_pip Change-Id: I348c632c0e86447eb4628dfee15efa21dd4b5a12
Loading
Please register or sign in to comment