Merge "Add OverviewReleaseFlags to control combination of Overview flags" into main

This commit is contained in:
Treehugger Robot
2025-04-04 05:10:39 -07:00
committed by Android (Google) Code Review
29 changed files with 99 additions and 59 deletions
@@ -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
@@ -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;
@@ -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<STATE_TYPE extends BaseState<STATE_
public final void calculateModalTaskSize(Context context, DeviceProfile dp, Rect outRect,
RecentsPagedOrientationHandler orientationHandler) {
calculateTaskSize(context, dp, outRect, orientationHandler);
boolean isGridOnlyOverview = dp.isTablet && Flags.enableGridOnlyOverview();
boolean isGridOnlyOverview = dp.isTablet && enableGridOnlyOverview();
int claimedSpaceBelow = isGridOnlyOverview
? dp.overviewActionsTopMarginPx + dp.overviewActionsHeight + dp.stashedTaskbarHeight
: (dp.heightPx - outRect.bottom - dp.getInsets().bottom);
@@ -17,7 +17,7 @@ package com.android.quickstep;
import static android.os.Process.THREAD_PRIORITY_BACKGROUND;
import static com.android.launcher3.Flags.enableGridOnlyOverview;
import static com.android.launcher3.util.OverviewReleaseFlags.enableGridOnlyOverview;
import static com.android.launcher3.Flags.enableRefactorTaskThumbnail;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import static com.android.quickstep.TaskUtils.checkCurrentOrManagedUserId;
@@ -24,7 +24,6 @@ import android.graphics.drawable.Drawable
import android.os.UserHandle
import android.util.SparseArray
import androidx.annotation.WorkerThread
import com.android.launcher3.Flags.enableOverviewIconMenu
import com.android.launcher3.Flags.enableRefactorTaskThumbnail
import com.android.launcher3.R
import com.android.launcher3.Utilities
@@ -38,6 +37,7 @@ import com.android.launcher3.util.DisplayController
import com.android.launcher3.util.DisplayController.DisplayInfoChangeListener
import com.android.launcher3.util.Executors
import com.android.launcher3.util.FlagOp
import com.android.launcher3.util.OverviewReleaseFlags.enableOverviewIconMenu
import com.android.launcher3.util.Preconditions
import com.android.quickstep.task.thumbnail.data.TaskIconDataSource
import com.android.quickstep.util.IconLabelUtil.getBadgedContentDescription
@@ -20,7 +20,7 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
import static android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS;
import static android.view.Surface.ROTATION_0;
import static com.android.launcher3.Flags.enableGridOnlyOverview;
import static com.android.launcher3.util.OverviewReleaseFlags.enableGridOnlyOverview;
import static com.android.launcher3.Flags.enableRefactorTaskThumbnail;
import static com.android.launcher3.Flags.enableShowEnabledShortcutsInAccessibilityMenu;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_SYSTEM_SHORTCUT_CLOSE_APP_TAP;
@@ -18,10 +18,10 @@ package com.android.quickstep
import android.content.Context
import androidx.annotation.VisibleForTesting
import androidx.annotation.WorkerThread
import com.android.launcher3.Flags.enableGridOnlyOverview
import com.android.launcher3.R
import com.android.launcher3.util.CancellableTask
import com.android.launcher3.util.Executors
import com.android.launcher3.util.OverviewReleaseFlags.enableGridOnlyOverview
import com.android.launcher3.util.Preconditions
import com.android.quickstep.task.thumbnail.data.TaskThumbnailDataSource
import com.android.quickstep.util.TaskKeyByLastActiveTimeCache
@@ -23,7 +23,7 @@ import static com.android.app.animation.Interpolators.LINEAR;
import static com.android.app.animation.Interpolators.TOUCH_RESPONSE;
import static com.android.app.animation.Interpolators.clampToProgress;
import static com.android.launcher3.Flags.enableDesktopExplodedView;
import static com.android.launcher3.Flags.enableGridOnlyOverview;
import static com.android.launcher3.util.OverviewReleaseFlags.enableGridOnlyOverview;
import static com.android.launcher3.LauncherAnimUtils.VIEW_ALPHA;
import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_X;
import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_Y;
@@ -19,7 +19,7 @@ import static com.android.app.animation.Interpolators.FINAL_FRAME;
import static com.android.app.animation.Interpolators.INSTANT;
import static com.android.app.animation.Interpolators.LINEAR;
import static com.android.launcher3.Flags.enableDesktopExplodedView;
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.states.StateAnimationConfig.ANIM_OVERVIEW_MODAL;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_SCALE;
@@ -17,7 +17,7 @@ package com.android.quickstep.fallback;
import static android.app.ActivityTaskManager.INVALID_TASK_ID;
import static com.android.launcher3.Flags.enableGridOnlyOverview;
import static com.android.launcher3.util.OverviewReleaseFlags.enableGridOnlyOverview;
import static com.android.quickstep.GestureState.GestureEndTarget.RECENTS;
import static com.android.quickstep.fallback.RecentsState.DEFAULT;
import static com.android.quickstep.fallback.RecentsState.MODAL_TASK;
@@ -17,7 +17,7 @@ package com.android.quickstep.fallback;
import static com.android.launcher3.Flags.enableDesktopExplodedView;
import static com.android.launcher3.Flags.enableDesktopWindowingCarouselDetach;
import static com.android.launcher3.Flags.enableGridOnlyOverview;
import static com.android.launcher3.util.OverviewReleaseFlags.enableGridOnlyOverview;
import static com.android.launcher3.LauncherState.FLAG_CLOSE_POPUPS;
import static com.android.launcher3.uioverrides.states.BackgroundAppState.getOverviewScaleAndOffsetForBackgroundState;
import static com.android.launcher3.uioverrides.states.OverviewModalTaskState.getOverviewScaleAndOffsetForModalState;
@@ -39,7 +39,6 @@ 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.LauncherAnimUtils
import com.android.launcher3.R
import com.android.launcher3.Utilities
@@ -48,6 +47,7 @@ import com.android.launcher3.touch.PagedOrientationHandler.ChildBounds
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.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
@@ -206,7 +206,7 @@ open class LandscapePagedViewHandler : RecentsPagedOrientationHandler {
@StagePosition stagePosition: Int,
): Int =
when {
Flags.enableOverviewIconMenu() ->
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
@@ -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
@@ -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
@@ -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<Change, List<Change>>? =
extractTopParentAndChildren(transitionInfo)
val splitRoots: Pair<Change, List<Change>>? = 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<Change, List<Change>>? = extractTopParentAndChildren(transitionInfo)
check(splitTree != null) { "Could not find a split root candidate" }
val rootCandidate = splitTree.first
val stageRootTaskIds: Set<Int> = splitTree.second
.map { it.taskInfo!!.taskId }
.toSet()
val leafTasks: List<Change> = transitionInfo.changes
.filter {
(TransitionUtil.isOpeningMode(it.mode) || it.mode == TRANSIT_CHANGE)
&& it.taskInfo != null
&& it.taskInfo!!.parentTaskId in stageRootTaskIds
}
.toList()
val stageRootTaskIds: Set<Int> = splitTree.second.map { it.taskInfo!!.taskId }.toSet()
val leafTasks: List<Change> =
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)
@@ -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;
@@ -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
@@ -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
@@ -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;
@@ -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<T extends OverlayUICallbacks> extends FrameLayo
return 0;
}
if (mDp.isTablet && Flags.enableGridOnlyOverview()) {
if (mDp.isTablet && enableGridOnlyOverview()) {
return mDp.stashedTaskbarHeight;
}
@@ -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
@@ -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;
@@ -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
@@ -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
@@ -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
@@ -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
+3 -2
View File
@@ -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();
@@ -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;
@@ -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()
}