From bea2e7ca6c54526066e4b0eb0d056bbeee837cf7 Mon Sep 17 00:00:00 2001 From: Merissa Mitchell Date: Tue, 6 May 2025 15:30:45 -0700 Subject: [PATCH] [Pip2] Use PipFlags#isPip2ExperimentEnabled in Launcher instead of checking Flags#enablePip2 directly Bug: 409622499 Test: m Flag: com.android.wm.shell.enable_pip2 Change-Id: I4892d6590403202737e40d21c6d215c1adc7b47e --- quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java | 4 ++-- quickstep/src/com/android/quickstep/views/RecentsView.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 6272cd583b..fe2bb8409f 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -167,10 +167,10 @@ import com.android.systemui.shared.system.InteractionJankMonitorWrapper; import com.android.systemui.shared.system.SysUiStatsLog; import com.android.systemui.shared.system.TaskStackChangeListener; import com.android.systemui.shared.system.TaskStackChangeListeners; -import com.android.wm.shell.Flags; import com.android.wm.shell.shared.GroupedTaskInfo; import com.android.wm.shell.shared.TransactionPool; import com.android.wm.shell.shared.desktopmode.DesktopModeStatus; +import com.android.wm.shell.shared.pip.PipFlags; import com.android.wm.shell.shared.startingsurface.SplashScreenExitAnimationUtils; import com.google.android.msdl.data.model.MSDLToken; @@ -2320,7 +2320,7 @@ public abstract class AbsSwipeUpHandler< mSwipePipToHomeAnimator.getFinishTransaction(), mSwipePipToHomeAnimator.getContentOverlay()); mIsSwipingPipToHome = false; - } else if (mIsSwipeForSplit && !Flags.enablePip2()) { + } else if (mIsSwipeForSplit && !PipFlags.isPip2ExperimentEnabled()) { // Transaction to hide the task to avoid flicker for entering PiP from split-screen. // Note: PiP2 handles entering differently, so skip if enable_pip2=true PictureInPictureSurfaceTransaction tx = diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index d0e9888e98..5803c2c54f 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -245,6 +245,7 @@ import com.android.wm.shell.common.pip.IPipAnimationListener; import com.android.wm.shell.shared.GroupedTaskInfo; import com.android.wm.shell.shared.desktopmode.DesktopModeStatus; import com.android.wm.shell.shared.desktopmode.DesktopModeTransitionSource; +import com.android.wm.shell.shared.pip.PipFlags; import com.android.wm.shell.shared.split.SplitBounds; import kotlin.Unit; @@ -6037,7 +6038,7 @@ public abstract class RecentsView< } final boolean sendUserLeaveHint = toRecents && shouldPip; - if (sendUserLeaveHint && !com.android.wm.shell.Flags.enablePip2()) { + if (sendUserLeaveHint && !PipFlags.isPip2ExperimentEnabled()) { // Notify the SysUI to use fade-in animation when entering PiP from live tile. // Note: PiP2 handles entering differently, so skip if enable_pip2=true. final SystemUiProxy systemUiProxy = SystemUiProxy.INSTANCE.get(getContext());