diff --git a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.kt b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.kt index c9f791c6ee..9bc1290d36 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.kt +++ b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.kt @@ -21,7 +21,6 @@ import com.android.app.animation.Interpolators.FINAL_FRAME import com.android.app.animation.Interpolators.INSTANT import com.android.app.animation.Interpolators.LINEAR import com.android.launcher3.Flags.enableDesktopExplodedView -import com.android.launcher3.Flags.enableGridOnlyOverview import com.android.launcher3.Flags.enableLargeDesktopWindowingTile import com.android.launcher3.LauncherState import com.android.launcher3.anim.AnimatedFloat @@ -37,6 +36,7 @@ import com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_SCALE import com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_TRANSLATE_X import com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_TRANSLATE_Y import com.android.launcher3.states.StateAnimationConfig.SKIP_OVERVIEW +import com.android.launcher3.util.OverviewReleaseFlags.enableGridOnlyOverview import com.android.quickstep.util.AnimUtils import com.android.quickstep.views.AddDesktopButton import com.android.quickstep.views.ClearAllButton diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/OverviewModalTaskState.java b/quickstep/src/com/android/launcher3/uioverrides/states/OverviewModalTaskState.java index ae82f82c01..7348fb2eda 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/states/OverviewModalTaskState.java +++ b/quickstep/src/com/android/launcher3/uioverrides/states/OverviewModalTaskState.java @@ -15,7 +15,7 @@ */ package com.android.launcher3.uioverrides.states; -import static com.android.launcher3.Flags.enableGridOnlyOverview; +import static com.android.launcher3.util.OverviewReleaseFlags.enableGridOnlyOverview; import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_OVERVIEW; import android.graphics.Rect; diff --git a/quickstep/src/com/android/quickstep/BaseContainerInterface.java b/quickstep/src/com/android/quickstep/BaseContainerInterface.java index 244dfc3971..fdb3740c3f 100644 --- a/quickstep/src/com/android/quickstep/BaseContainerInterface.java +++ b/quickstep/src/com/android/quickstep/BaseContainerInterface.java @@ -18,6 +18,7 @@ package com.android.quickstep; import static com.android.app.animation.Interpolators.INSTANT; import static com.android.app.animation.Interpolators.LINEAR; import static com.android.launcher3.LauncherAnimUtils.VIEW_BACKGROUND_COLOR; +import static com.android.launcher3.util.OverviewReleaseFlags.enableGridOnlyOverview; import static com.android.quickstep.GestureState.GestureEndTarget.LAST_TASK; import static com.android.quickstep.GestureState.GestureEndTarget.RECENTS; @@ -37,7 +38,6 @@ import androidx.annotation.Nullable; import androidx.annotation.UiThread; import com.android.launcher3.DeviceProfile; -import com.android.launcher3.Flags; import com.android.launcher3.R; import com.android.launcher3.statehandlers.DesktopVisibilityController; import com.android.launcher3.statemanager.BaseState; @@ -397,7 +397,7 @@ public abstract class BaseContainerInterface + enableOverviewIconMenu() -> thumbnailView.resources.getDimensionPixelSize( R.dimen.task_thumbnail_icon_menu_expanded_width ) @@ -659,7 +659,7 @@ open class LandscapePagedViewHandler : RecentsPagedOrientationHandler { dividerSize: Int, oneIconHiddenDueToSmallWidth: Boolean, ): SplitIconPositions { - return if (Flags.enableOverviewIconMenu()) { + return if (enableOverviewIconMenu()) { if (isRtl) { SplitIconPositions(-(totalThumbnailHeight - primarySnapshotHeight), 0) } else { @@ -695,7 +695,7 @@ open class LandscapePagedViewHandler : RecentsPagedOrientationHandler { open fun updateSplitIconsPosition(iconView: View, translationY: Int, isRtl: Boolean) { val layoutParams = iconView.layoutParams as FrameLayout.LayoutParams - if (Flags.enableOverviewIconMenu()) { + if (enableOverviewIconMenu()) { val appChipView = iconView as IconAppChipView layoutParams.gravity = if (isRtl) Gravity.BOTTOM or Gravity.START else Gravity.TOP or Gravity.END diff --git a/quickstep/src/com/android/quickstep/orientation/PortraitPagedViewHandler.kt b/quickstep/src/com/android/quickstep/orientation/PortraitPagedViewHandler.kt index 74ae688bd7..d4a11a333b 100644 --- a/quickstep/src/com/android/quickstep/orientation/PortraitPagedViewHandler.kt +++ b/quickstep/src/com/android/quickstep/orientation/PortraitPagedViewHandler.kt @@ -31,7 +31,6 @@ import android.widget.FrameLayout import android.widget.LinearLayout import androidx.core.view.updateLayoutParams import com.android.launcher3.DeviceProfile -import com.android.launcher3.Flags.enableOverviewIconMenu import com.android.launcher3.LauncherAnimUtils import com.android.launcher3.R import com.android.launcher3.Utilities @@ -40,6 +39,7 @@ import com.android.launcher3.touch.DefaultPagedViewHandler import com.android.launcher3.touch.PagedOrientationHandler.Float2DAction import com.android.launcher3.touch.PagedOrientationHandler.Int2DAction import com.android.launcher3.touch.SingleAxisSwipeDetector +import com.android.launcher3.util.OverviewReleaseFlags.enableOverviewIconMenu import com.android.launcher3.util.SplitConfigurationOptions import com.android.launcher3.util.SplitConfigurationOptions.SplitPositionOption import com.android.launcher3.util.SplitConfigurationOptions.StagePosition diff --git a/quickstep/src/com/android/quickstep/orientation/SeascapePagedViewHandler.kt b/quickstep/src/com/android/quickstep/orientation/SeascapePagedViewHandler.kt index 456115fdca..dcd7d876e3 100644 --- a/quickstep/src/com/android/quickstep/orientation/SeascapePagedViewHandler.kt +++ b/quickstep/src/com/android/quickstep/orientation/SeascapePagedViewHandler.kt @@ -30,11 +30,11 @@ import androidx.core.util.component1 import androidx.core.util.component2 import androidx.core.view.updateLayoutParams import com.android.launcher3.DeviceProfile -import com.android.launcher3.Flags import com.android.launcher3.R import com.android.launcher3.Utilities import com.android.launcher3.logger.LauncherAtom import com.android.launcher3.touch.SingleAxisSwipeDetector +import com.android.launcher3.util.OverviewReleaseFlags.enableOverviewIconMenu import com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_BOTTOM_OR_RIGHT import com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT import com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_UNDEFINED @@ -81,7 +81,7 @@ class SeascapePagedViewHandler : LandscapePagedViewHandler() { taskInsetMargin: Float, taskViewIcon: View, ): Float { - if (Flags.enableOverviewIconMenu()) { + if (enableOverviewIconMenu()) { return y } val lp = taskMenuView.layoutParams as BaseDragLayer.LayoutParams @@ -363,7 +363,7 @@ class SeascapePagedViewHandler : LandscapePagedViewHandler() { dividerSize: Int, oneIconHiddenDueToSmallWidth: Boolean, ): SplitIconPositions { - return if (Flags.enableOverviewIconMenu()) { + return if (enableOverviewIconMenu()) { if (isRtl) { SplitIconPositions( topLeftY = totalThumbnailHeight - primarySnapshotHeight, @@ -405,7 +405,7 @@ class SeascapePagedViewHandler : LandscapePagedViewHandler() { override fun updateSplitIconsPosition(iconView: View, translationY: Int, isRtl: Boolean) { val layoutParams = iconView.layoutParams as FrameLayout.LayoutParams - if (Flags.enableOverviewIconMenu()) { + if (enableOverviewIconMenu()) { val appChipView = iconView as IconAppChipView layoutParams.gravity = if (isRtl) Gravity.TOP or Gravity.START else Gravity.BOTTOM or Gravity.END diff --git a/quickstep/src/com/android/quickstep/util/SplitAnimationController.kt b/quickstep/src/com/android/quickstep/util/SplitAnimationController.kt index 7dc7b9ec31..78e2b1a720 100644 --- a/quickstep/src/com/android/quickstep/util/SplitAnimationController.kt +++ b/quickstep/src/com/android/quickstep/util/SplitAnimationController.kt @@ -47,7 +47,6 @@ import androidx.core.util.component1 import androidx.core.util.component2 import com.android.app.animation.Interpolators import com.android.launcher3.DeviceProfile -import com.android.launcher3.Flags.enableOverviewIconMenu import com.android.launcher3.Flags.enableRefactorTaskThumbnail import com.android.launcher3.InsettableFrameLayout import com.android.launcher3.QuickstepTransitionManager @@ -63,6 +62,7 @@ import com.android.launcher3.statemanager.StateManager import com.android.launcher3.taskbar.TaskbarActivityContext import com.android.launcher3.uioverrides.QuickstepLauncher import com.android.launcher3.util.MultiPropertyFactory.MULTI_PROPERTY_VALUE +import com.android.launcher3.util.OverviewReleaseFlags.enableOverviewIconMenu import com.android.launcher3.util.SplitConfigurationOptions.SplitSelectSource import com.android.launcher3.views.BaseDragLayer import com.android.quickstep.TaskViewUtils @@ -731,8 +731,7 @@ class SplitAnimationController(val splitSelectStateController: SplitSelectStateC // Create an AnimatorSet that will run both shell and launcher transitions together val launchAnimation = AnimatorSet() - val splitRoots: Pair>? = - extractTopParentAndChildren(transitionInfo) + val splitRoots: Pair>? = extractTopParentAndChildren(transitionInfo) check(splitRoots != null) { "Could not find split roots" } // Will point to change (0) in diagram above @@ -986,16 +985,15 @@ class SplitAnimationController(val splitSelectStateController: SplitSelectStateC val splitTree: Pair>? = extractTopParentAndChildren(transitionInfo) check(splitTree != null) { "Could not find a split root candidate" } val rootCandidate = splitTree.first - val stageRootTaskIds: Set = splitTree.second - .map { it.taskInfo!!.taskId } - .toSet() - val leafTasks: List = transitionInfo.changes - .filter { - (TransitionUtil.isOpeningMode(it.mode) || it.mode == TRANSIT_CHANGE) - && it.taskInfo != null - && it.taskInfo!!.parentTaskId in stageRootTaskIds - } - .toList() + val stageRootTaskIds: Set = splitTree.second.map { it.taskInfo!!.taskId }.toSet() + val leafTasks: List = + transitionInfo.changes + .filter { + (TransitionUtil.isOpeningMode(it.mode) || it.mode == TRANSIT_CHANGE) && + it.taskInfo != null && + it.taskInfo!!.parentTaskId in stageRootTaskIds + } + .toList() // Starting position is a 34% size tile centered in the middle of the screen. // Ending position is the full device screen. @@ -1023,7 +1021,6 @@ class SplitAnimationController(val splitSelectStateController: SplitSelectStateC t.apply() } - // When animation ends, run finishCallback progressUpdater.addListener( object : AnimatorListenerAdapter() { @@ -1037,8 +1034,13 @@ class SplitAnimationController(val splitSelectStateController: SplitSelectStateC val endAbsBounds = leaf.endAbsBounds t.setAlpha(leaf.leash, 1f) - t.setCrop(leaf.leash, 0f, 0f, - endAbsBounds.width().toFloat(), endAbsBounds.height().toFloat()) + t.setCrop( + leaf.leash, + 0f, + 0f, + endAbsBounds.width().toFloat(), + endAbsBounds.height().toFloat(), + ) t.setPosition(leaf.leash, 0f, 0f) } @@ -1046,15 +1048,22 @@ class SplitAnimationController(val splitSelectStateController: SplitSelectStateC val endAbsBounds = stageRoot.endAbsBounds t.setAlpha(stageRoot.leash, 1f) - t.setCrop(stageRoot.leash, 0f, 0f, - endAbsBounds.width().toFloat(), endAbsBounds.height().toFloat()) - t.setPosition(stageRoot.leash, endAbsBounds.left.toFloat(), - endAbsBounds.top.toFloat()) + t.setCrop( + stageRoot.leash, + 0f, + 0f, + endAbsBounds.width().toFloat(), + endAbsBounds.height().toFloat(), + ) + t.setPosition( + stageRoot.leash, + endAbsBounds.left.toFloat(), + endAbsBounds.top.toFloat(), + ) } t.apply() } } - ) launchAnimation.play(progressUpdater) diff --git a/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java b/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java index 17c262c7ba..5c1f12bc5a 100644 --- a/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java +++ b/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java @@ -17,7 +17,7 @@ package com.android.quickstep.util; import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN; -import static com.android.launcher3.Flags.enableGridOnlyOverview; +import static com.android.launcher3.util.OverviewReleaseFlags.enableGridOnlyOverview; import static com.android.launcher3.states.RotationHelper.deltaRotation; import static com.android.launcher3.touch.PagedOrientationHandler.MATRIX_POST_TRANSLATE; import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_BOTTOM_OR_RIGHT; diff --git a/quickstep/src/com/android/quickstep/views/DesktopTaskView.kt b/quickstep/src/com/android/quickstep/views/DesktopTaskView.kt index 000455be2d..a24711ef26 100644 --- a/quickstep/src/com/android/quickstep/views/DesktopTaskView.kt +++ b/quickstep/src/com/android/quickstep/views/DesktopTaskView.kt @@ -33,12 +33,12 @@ import androidx.core.content.res.ResourcesCompat import androidx.core.view.updateLayoutParams import com.android.internal.hidden_from_bootclasspath.com.android.window.flags.Flags.enableDesktopRecentsTransitionsCornersBugfix import com.android.launcher3.Flags.enableDesktopExplodedView -import com.android.launcher3.Flags.enableOverviewIconMenu import com.android.launcher3.Flags.enableRefactorTaskThumbnail import com.android.launcher3.R import com.android.launcher3.statehandlers.DesktopVisibilityController import com.android.launcher3.testing.TestLogging import com.android.launcher3.testing.shared.TestProtocol +import com.android.launcher3.util.OverviewReleaseFlags.enableOverviewIconMenu import com.android.launcher3.util.RunnableList import com.android.launcher3.util.SplitConfigurationOptions import com.android.launcher3.util.TransformingTouchDelegate diff --git a/quickstep/src/com/android/quickstep/views/GroupedTaskView.kt b/quickstep/src/com/android/quickstep/views/GroupedTaskView.kt index 85267a482f..2bc2c849b2 100644 --- a/quickstep/src/com/android/quickstep/views/GroupedTaskView.kt +++ b/quickstep/src/com/android/quickstep/views/GroupedTaskView.kt @@ -23,10 +23,10 @@ import android.util.Log import android.view.View import android.view.ViewStub import com.android.internal.jank.Cuj -import com.android.launcher3.Flags.enableOverviewIconMenu import com.android.launcher3.Flags.enableRefactorTaskThumbnail import com.android.launcher3.R import com.android.launcher3.Utilities +import com.android.launcher3.util.OverviewReleaseFlags.enableOverviewIconMenu import com.android.launcher3.util.RunnableList import com.android.launcher3.util.SplitConfigurationOptions import com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_BOTTOM_OR_RIGHT diff --git a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java index b86d0c85de..4b338c6bac 100644 --- a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java +++ b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java @@ -18,7 +18,7 @@ package com.android.quickstep.views; import static android.app.ActivityTaskManager.INVALID_TASK_ID; import static android.window.DesktopModeFlags.ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY; -import static com.android.launcher3.Flags.enableGridOnlyOverview; +import static com.android.launcher3.util.OverviewReleaseFlags.enableGridOnlyOverview; import static com.android.launcher3.LauncherState.CLEAR_ALL_BUTTON; import static com.android.launcher3.LauncherState.ADD_DESK_BUTTON; import static com.android.launcher3.LauncherState.NORMAL; diff --git a/quickstep/src/com/android/quickstep/views/OverviewActionsView.java b/quickstep/src/com/android/quickstep/views/OverviewActionsView.java index c6fcba1bbe..d3e5aaaf30 100644 --- a/quickstep/src/com/android/quickstep/views/OverviewActionsView.java +++ b/quickstep/src/com/android/quickstep/views/OverviewActionsView.java @@ -17,6 +17,7 @@ package com.android.quickstep.views; import static com.android.launcher3.Flags.enableOverviewBackgroundWallpaperBlur; +import static com.android.launcher3.util.OverviewReleaseFlags.enableGridOnlyOverview; import android.content.Context; import android.content.res.Configuration; @@ -34,7 +35,6 @@ import androidx.annotation.IntDef; import androidx.annotation.Nullable; import com.android.launcher3.DeviceProfile; -import com.android.launcher3.Flags; import com.android.launcher3.Insettable; import com.android.launcher3.R; import com.android.launcher3.anim.AnimatedFloat; @@ -390,7 +390,7 @@ public class OverviewActionsView extends FrameLayo return 0; } - if (mDp.isTablet && Flags.enableGridOnlyOverview()) { + if (mDp.isTablet && enableGridOnlyOverview()) { return mDp.stashedTaskbarHeight; } diff --git a/quickstep/src/com/android/quickstep/views/RecentsDismissUtils.kt b/quickstep/src/com/android/quickstep/views/RecentsDismissUtils.kt index 32ce047db6..7b895939e9 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsDismissUtils.kt +++ b/quickstep/src/com/android/quickstep/views/RecentsDismissUtils.kt @@ -21,11 +21,11 @@ import androidx.dynamicanimation.animation.FloatPropertyCompat import androidx.dynamicanimation.animation.FloatValueHolder import androidx.dynamicanimation.animation.SpringAnimation import androidx.dynamicanimation.animation.SpringForce -import com.android.launcher3.Flags.enableGridOnlyOverview import com.android.launcher3.R import com.android.launcher3.Utilities.boundToRange import com.android.launcher3.util.DynamicResource import com.android.launcher3.util.MSDLPlayerWrapper +import com.android.launcher3.util.OverviewReleaseFlags.enableGridOnlyOverview import com.android.launcher3.views.ActivityContext import com.android.quickstep.util.TaskGridNavHelper import com.android.quickstep.views.RecentsView.RECENTS_SCALE_PROPERTY diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 5aa83948b4..9fbc08c0c6 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -39,7 +39,7 @@ import static com.android.launcher3.Flags.enableAdditionalHomeAnimations; import static com.android.launcher3.Flags.enableDesktopExplodedView; import static com.android.launcher3.Flags.enableDesktopTaskAlphaAnimation; import static com.android.launcher3.Flags.enableExpressiveDismissTaskMotion; -import static com.android.launcher3.Flags.enableGridOnlyOverview; +import static com.android.launcher3.util.OverviewReleaseFlags.enableGridOnlyOverview; import static com.android.launcher3.Flags.enableLargeDesktopWindowingTile; import static com.android.launcher3.Flags.enableOverviewBackgroundWallpaperBlur; import static com.android.launcher3.Flags.enableRefactorTaskThumbnail; diff --git a/quickstep/src/com/android/quickstep/views/RecentsViewUtils.kt b/quickstep/src/com/android/quickstep/views/RecentsViewUtils.kt index 868da1e401..017cec2eed 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsViewUtils.kt +++ b/quickstep/src/com/android/quickstep/views/RecentsViewUtils.kt @@ -31,15 +31,15 @@ import androidx.core.view.children import com.android.launcher3.AbstractFloatingView.TYPE_TASK_MENU import com.android.launcher3.AbstractFloatingView.getTopOpenViewWithType import com.android.launcher3.Flags.enableDesktopExplodedView -import com.android.launcher3.Flags.enableGridOnlyOverview import com.android.launcher3.Flags.enableLargeDesktopWindowingTile -import com.android.launcher3.Flags.enableOverviewIconMenu import com.android.launcher3.Flags.enableSeparateExternalDisplayTasks import com.android.launcher3.Utilities.getPivotsForScalingRectToRect import com.android.launcher3.statehandlers.DesktopVisibilityController import com.android.launcher3.statehandlers.DesktopVisibilityController.Companion.INACTIVE_DESK_ID import com.android.launcher3.statemanager.BaseState import com.android.launcher3.util.IntArray +import com.android.launcher3.util.OverviewReleaseFlags.enableGridOnlyOverview +import com.android.launcher3.util.OverviewReleaseFlags.enableOverviewIconMenu import com.android.launcher3.util.window.WindowManagerProxy.DesktopVisibilityListener import com.android.quickstep.GestureState import com.android.quickstep.RemoteTargetGluer.RemoteTargetHandle diff --git a/quickstep/src/com/android/quickstep/views/TaskContainer.kt b/quickstep/src/com/android/quickstep/views/TaskContainer.kt index 901fae6081..c2f5839c69 100644 --- a/quickstep/src/com/android/quickstep/views/TaskContainer.kt +++ b/quickstep/src/com/android/quickstep/views/TaskContainer.kt @@ -21,9 +21,9 @@ import android.graphics.Matrix import android.view.View import android.view.View.OnClickListener import com.android.app.tracing.traceSection -import com.android.launcher3.Flags.enableOverviewIconMenu import com.android.launcher3.Flags.enableRefactorTaskThumbnail import com.android.launcher3.model.data.TaskViewItemInfo +import com.android.launcher3.util.OverviewReleaseFlags.enableOverviewIconMenu import com.android.launcher3.util.SplitConfigurationOptions import com.android.launcher3.util.TransformingTouchDelegate import com.android.quickstep.TaskOverlayFactory diff --git a/quickstep/src/com/android/quickstep/views/TaskMenuView.kt b/quickstep/src/com/android/quickstep/views/TaskMenuView.kt index 68855a59ba..6984ae2f14 100644 --- a/quickstep/src/com/android/quickstep/views/TaskMenuView.kt +++ b/quickstep/src/com/android/quickstep/views/TaskMenuView.kt @@ -35,13 +35,13 @@ import android.widget.TextView import androidx.core.content.res.ResourcesCompat import com.android.app.animation.Interpolators import com.android.launcher3.AbstractFloatingView -import com.android.launcher3.Flags.enableOverviewIconMenu import com.android.launcher3.Flags.enableRefactorTaskThumbnail import com.android.launcher3.R import com.android.launcher3.anim.AnimationSuccessListener import com.android.launcher3.anim.RoundedRectRevealOutlineProvider import com.android.launcher3.popup.SystemShortcut import com.android.launcher3.util.MultiPropertyFactory +import com.android.launcher3.util.OverviewReleaseFlags.enableOverviewIconMenu import com.android.launcher3.util.SplitConfigurationOptions import com.android.launcher3.views.BaseDragLayer import com.android.quickstep.TaskOverlayFactory diff --git a/quickstep/src/com/android/quickstep/views/TaskView.kt b/quickstep/src/com/android/quickstep/views/TaskView.kt index e97c29009e..629d2d44dd 100644 --- a/quickstep/src/com/android/quickstep/views/TaskView.kt +++ b/quickstep/src/com/android/quickstep/views/TaskView.kt @@ -46,10 +46,8 @@ import com.android.app.tracing.traceSection import com.android.launcher3.AbstractFloatingView import com.android.launcher3.Flags.enableCursorHoverStates import com.android.launcher3.Flags.enableDesktopExplodedView -import com.android.launcher3.Flags.enableGridOnlyOverview import com.android.launcher3.Flags.enableHoverOfChildElementsInTaskview import com.android.launcher3.Flags.enableLargeDesktopWindowingTile -import com.android.launcher3.Flags.enableOverviewIconMenu import com.android.launcher3.Flags.enableRefactorTaskThumbnail import com.android.launcher3.Flags.enableSeparateExternalDisplayTasks import com.android.launcher3.R @@ -66,6 +64,8 @@ import com.android.launcher3.util.KFloatProperty import com.android.launcher3.util.MultiPropertyDelegate import com.android.launcher3.util.MultiPropertyFactory import com.android.launcher3.util.MultiValueAlpha +import com.android.launcher3.util.OverviewReleaseFlags.enableGridOnlyOverview +import com.android.launcher3.util.OverviewReleaseFlags.enableOverviewIconMenu import com.android.launcher3.util.RunnableList import com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_UNDEFINED import com.android.launcher3.util.SplitConfigurationOptions.StagePosition diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index f5c8e80cd8..88aa445dfc 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -17,7 +17,6 @@ package com.android.launcher3; import static com.android.app.animation.Interpolators.LINEAR; -import static com.android.launcher3.Flags.enableOverviewIconMenu; import static com.android.launcher3.Flags.enableScalingRevealHomeAnimation; import static com.android.launcher3.InvariantDeviceProfile.INDEX_DEFAULT; import static com.android.launcher3.InvariantDeviceProfile.INDEX_LANDSCAPE; @@ -30,6 +29,8 @@ import static com.android.launcher3.icons.IconNormalizer.ICON_VISIBLE_AREA_FACTO import static com.android.launcher3.testing.shared.ResourceUtils.INVALID_RESOURCE_HANDLE; import static com.android.launcher3.testing.shared.ResourceUtils.pxFromDp; import static com.android.launcher3.testing.shared.ResourceUtils.roundPxValueFromFloat; +import static com.android.launcher3.util.OverviewReleaseFlags.enableGridOnlyOverview; +import static com.android.launcher3.util.OverviewReleaseFlags.enableOverviewIconMenu; import static com.android.wm.shell.Flags.enableBubbleBar; import static com.android.wm.shell.Flags.enableBubbleBarOnPhones; import static com.android.wm.shell.Flags.enableTinyTaskbar; @@ -2126,7 +2127,7 @@ public class DeviceProfile { /** Gets the space that the overview actions will take, including bottom margin. */ public int getOverviewActionsClaimedSpace() { - int overviewActionsSpace = isTablet && Flags.enableGridOnlyOverview() + int overviewActionsSpace = isTablet && enableGridOnlyOverview() ? 0 : (overviewActionsTopMarginPx + overviewActionsHeight); return overviewActionsSpace + getOverviewActionsClaimedSpaceBelow(); diff --git a/src/com/android/launcher3/testing/TestInformationHandler.java b/src/com/android/launcher3/testing/TestInformationHandler.java index e5105cdc63..6aa2200969 100644 --- a/src/com/android/launcher3/testing/TestInformationHandler.java +++ b/src/com/android/launcher3/testing/TestInformationHandler.java @@ -16,7 +16,7 @@ package com.android.launcher3.testing; import static com.android.launcher3.Flags.enableFallbackOverviewInWindow; -import static com.android.launcher3.Flags.enableGridOnlyOverview; +import static com.android.launcher3.util.OverviewReleaseFlags.enableGridOnlyOverview; import static com.android.launcher3.Flags.enableLauncherOverviewInWindow; import static com.android.launcher3.allapps.AllAppsStore.DEFER_UPDATES_TEST; import static com.android.launcher3.config.FeatureFlags.ENABLE_TASKBAR_NAVBAR_UNIFICATION; diff --git a/src/com/android/launcher3/util/OverviewReleaseFlags.kt b/src/com/android/launcher3/util/OverviewReleaseFlags.kt new file mode 100644 index 0000000000..c407420947 --- /dev/null +++ b/src/com/android/launcher3/util/OverviewReleaseFlags.kt @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2025 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.launcher3.util + +import com.android.launcher3.Flags + +object OverviewReleaseFlags { + private fun enableOverviewNewLayout() = + Flags.enableRefactorTaskThumbnail() && + Flags.enableOverviewIconMenu() && + Flags.enableGridOnlyOverview() + + @JvmStatic fun enableOverviewIconMenu() = enableOverviewNewLayout() + + @JvmStatic fun enableGridOnlyOverview() = enableOverviewNewLayout() +}