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

Commit 58373f97 authored by Merissa Mitchell's avatar Merissa Mitchell
Browse files

[PiP on CD] Update CD PiP check to depend on Pip2 flag.

Bug: None
Test: m
Flag: com.android.window.flags.enable_connected_displays_pip
Change-Id: Ide0554b1463585e6f6bcefeac4f050645c350d99
parent 679a4615
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.window.DesktopExperienceFlags;
import android.window.DesktopModeFlags;
import android.window.DisplayAreaInfo;

import com.android.wm.shell.Flags;
import com.android.wm.shell.RootTaskDisplayAreaOrganizer;
import com.android.wm.shell.desktopmode.DesktopUserRepositories;
import com.android.wm.shell.desktopmode.DragToDesktopTransitionHandler;
@@ -58,9 +59,13 @@ public class PipDesktopState {
                && mDragToDesktopTransitionHandlerOptional.isPresent();
    }

    /** Returns whether PiP in Connected Displays is enabled by checking the flag. */
    /**
     * Returns whether PiP in Connected Displays is enabled by checking the following:
     * - PiP in Connected Displays flag is enabled
     * - PiP2 flag is enabled
     */
    public boolean isConnectedDisplaysPipEnabled() {
        return DesktopExperienceFlags.ENABLE_CONNECTED_DISPLAYS_PIP.isTrue();
        return DesktopExperienceFlags.ENABLE_CONNECTED_DISPLAYS_PIP.isTrue() && Flags.enablePip2();
    }

    /** Returns whether the display with the PiP task is in freeform windowing mode. */