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

Commit de420404 authored by Merissa Mitchell's avatar Merissa Mitchell
Browse files

[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
parent b9fbfa2c
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