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

Commit 9b19b8f9 authored by Merissa Mitchell's avatar Merissa Mitchell Committed by Android (Google) Code Review
Browse files

Merge "[PiP on Desktop] Move PiP DW flag to DesktopExperienceFlags." into main

parents 6d46d35e 4ab295cb
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -83,6 +83,8 @@ public enum DesktopExperienceFlags {
    ENABLE_DESKTOP_TASK_LIMIT_SEPARATE_TRANSITION(
            Flags::enableDesktopTaskLimitSeparateTransition, false,
            Flags.FLAG_ENABLE_DESKTOP_TASK_LIMIT_SEPARATE_TRANSITION),
    ENABLE_DESKTOP_WINDOWING_PIP(Flags::enableDesktopWindowingPip, false,
            Flags.FLAG_ENABLE_DESKTOP_WINDOWING_PIP),
    ENABLE_DISPLAY_CONTENT_MODE_MANAGEMENT(
            com.android.server.display.feature.flags.Flags::enableDisplayContentModeManagement,
            true, FLAG_ENABLE_DISPLAY_CONTENT_MODE_MANAGEMENT),
+0 −1
Original line number Diff line number Diff line
@@ -96,7 +96,6 @@ public enum DesktopModeFlags {
    ENABLE_DESKTOP_WINDOWING_MULTI_INSTANCE_FEATURES(
            Flags::enableDesktopWindowingMultiInstanceFeatures, true),
    ENABLE_DESKTOP_WINDOWING_PERSISTENCE(Flags::enableDesktopWindowingPersistence, true),
    ENABLE_DESKTOP_WINDOWING_PIP(Flags::enableDesktopWindowingPip, false),
    ENABLE_DESKTOP_WINDOWING_QUICK_SWITCH(Flags::enableDesktopWindowingQuickSwitch, true),
    ENABLE_DESKTOP_WINDOWING_SCVH_CACHE(Flags::enableDesktopWindowingScvhCacheBugFix, true),
    ENABLE_DESKTOP_WINDOWING_SIZE_CONSTRAINTS(Flags::enableDesktopWindowingSizeConstraints, true),
+1 −2
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.wm.shell.common.pip
import android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM
import android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED
import android.window.DesktopExperienceFlags
import android.window.DesktopModeFlags
import com.android.wm.shell.Flags
import com.android.wm.shell.RootTaskDisplayAreaOrganizer
import com.android.wm.shell.common.DisplayLayout
@@ -40,7 +39,7 @@ class PipDesktopState(
     * - DragToDesktopTransitionHandler is present
     */
    fun isDesktopWindowingPipEnabled(): Boolean =
        DesktopModeFlags.ENABLE_DESKTOP_WINDOWING_PIP.isTrue &&
        DesktopExperienceFlags.ENABLE_DESKTOP_WINDOWING_PIP.isTrue &&
                desktopUserRepositoriesOptional.isPresent &&
                dragToDesktopTransitionHandlerOptional.isPresent

+2 −2
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ package com.android.wm.shell.dagger.pip;
import android.annotation.NonNull;
import android.content.Context;
import android.os.Handler;
import android.window.DesktopModeFlags;
import android.window.DesktopExperienceFlags;

import com.android.internal.jank.InteractionJankMonitor;
import com.android.wm.shell.RootTaskDisplayAreaOrganizer;
@@ -282,7 +282,7 @@ public abstract class Pip2Module {
            PipDesktopState pipDesktopState, DesktopState desktopState
    ) {
        if (desktopState.canEnterDesktopMode()
                && DesktopModeFlags.ENABLE_DESKTOP_WINDOWING_PIP.isTrue()) {
                && DesktopExperienceFlags.ENABLE_DESKTOP_WINDOWING_PIP.isTrue()) {
            return Optional.of(
                    new DesktopPipTransitionController(shellTaskOrganizer,
                            desktopTasksControllerOptional.get(),
+1 −1
Original line number Diff line number Diff line
@@ -1016,7 +1016,7 @@ class DesktopTasksController(
                taskRepository.isOnlyVisibleNonClosingTask(taskId = taskId, displayId = displayId)
            }
        val isMinimizingToPip =
            DesktopModeFlags.ENABLE_DESKTOP_WINDOWING_PIP.isTrue &&
            DesktopExperienceFlags.ENABLE_DESKTOP_WINDOWING_PIP.isTrue &&
                (taskInfo.pictureInPictureParams?.isAutoEnterEnabled ?: false)

        // If task is going to PiP, start a PiP transition instead of a minimize transition
Loading