diff --git a/quickstep/res/values/dimens.xml b/quickstep/res/values/dimens.xml index c0b665730d..50f123676f 100644 --- a/quickstep/res/values/dimens.xml +++ b/quickstep/res/values/dimens.xml @@ -292,10 +292,14 @@ 16dp + 40dp 150dp 225dp 300dp - 40dp + + 30dp + 100dp + 200dp 24dp diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 305fa93aca..4f1bd3d103 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -27,6 +27,7 @@ import static com.android.launcher3.PagedView.INVALID_PAGE; import static com.android.launcher3.anim.Interpolators.ACCEL_DEACCEL; import static com.android.launcher3.anim.Interpolators.DEACCEL; import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_2; +import static com.android.launcher3.config.FeatureFlags.ENABLE_TASKBAR_REVISED_THRESHOLDS; import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_BACKGROUND; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.IGNORE; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_HOME_GESTURE; @@ -344,7 +345,9 @@ public abstract class AbsSwipeUpHandler, Resources res = context.getResources(); mTaskbarAppWindowThreshold = res - .getDimensionPixelSize(R.dimen.taskbar_app_window_threshold); + .getDimensionPixelSize(ENABLE_TASKBAR_REVISED_THRESHOLDS.get() + ? R.dimen.taskbar_app_window_threshold_v2 + : R.dimen.taskbar_app_window_threshold); mTaskbarCatchUpThreshold = res.getDimensionPixelSize(R.dimen.taskbar_catch_up_threshold); mIsTransientTaskbar = DisplayController.isTransientTaskbar(mActivity); diff --git a/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java b/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java index b39d13c3c6..bf666ea8a6 100644 --- a/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java +++ b/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java @@ -27,6 +27,7 @@ import static com.android.launcher3.PagedView.ACTION_MOVE_ALLOW_EASY_FLING; import static com.android.launcher3.PagedView.DEBUG_FAILED_QUICKSWITCH; import static com.android.launcher3.Utilities.EDGE_NAV_BAR; import static com.android.launcher3.Utilities.squaredHypot; +import static com.android.launcher3.config.FeatureFlags.ENABLE_TASKBAR_REVISED_THRESHOLDS; import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; import static com.android.launcher3.util.TraceHelper.FLAG_CHECK_FOR_RACE_CONDITIONS; import static com.android.launcher3.util.VelocityUtils.PX_PER_MS; @@ -164,7 +165,9 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC mTaskbarAlreadyOpen = controller != null && !controller.isTaskbarStashed(); mIsTransientTaskbar = DisplayController.isTransientTaskbar(base); mTaskbarHomeOverviewThreshold = base.getResources() - .getDimensionPixelSize(R.dimen.taskbar_home_overview_threshold); + .getDimensionPixelSize(ENABLE_TASKBAR_REVISED_THRESHOLDS.get() + ? R.dimen.taskbar_home_overview_threshold_v2 + : R.dimen.taskbar_home_overview_threshold); boolean continuingPreviousGesture = mTaskAnimationManager.isRecentsAnimationRunning(); mIsDeferredDownTarget = !continuingPreviousGesture && isDeferredDownTarget; diff --git a/quickstep/src/com/android/quickstep/inputconsumers/TaskbarStashInputConsumer.java b/quickstep/src/com/android/quickstep/inputconsumers/TaskbarStashInputConsumer.java index b7f2022073..3a094905bf 100644 --- a/quickstep/src/com/android/quickstep/inputconsumers/TaskbarStashInputConsumer.java +++ b/quickstep/src/com/android/quickstep/inputconsumers/TaskbarStashInputConsumer.java @@ -18,6 +18,7 @@ package com.android.quickstep.inputconsumers; import static android.view.MotionEvent.INVALID_POINTER_ID; import static com.android.launcher3.Utilities.squaredHypot; +import static com.android.launcher3.config.FeatureFlags.ENABLE_TASKBAR_REVISED_THRESHOLDS; import static com.android.launcher3.taskbar.TaskbarAutohideSuspendController.FLAG_AUTOHIDE_SUSPEND_TOUCHING; import android.content.Context; @@ -72,7 +73,9 @@ public class TaskbarStashInputConsumer extends DelegateInputConsumer { Resources res = context.getResources(); mUnstashArea = res.getDimensionPixelSize(R.dimen.taskbar_unstash_input_area); - int taskbarThreshold = res.getDimensionPixelSize(R.dimen.taskbar_nav_threshold); + int taskbarThreshold = res.getDimensionPixelSize(ENABLE_TASKBAR_REVISED_THRESHOLDS.get() + ? R.dimen.taskbar_nav_threshold_v2 + : R.dimen.taskbar_nav_threshold); int screenHeight = taskbarActivityContext.getDeviceProfile().heightPx; mTaskbarThresholdY = screenHeight - taskbarThreshold; diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 50b756362a..db604f2ba7 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -388,6 +388,9 @@ 0dp 0dp 0dp + 0dp + 0dp + 0dp 16dp diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java index 982f6a9f75..d6d468e8cf 100644 --- a/src/com/android/launcher3/config/FeatureFlags.java +++ b/src/com/android/launcher3/config/FeatureFlags.java @@ -322,6 +322,10 @@ public final class FeatureFlags { "HOME_GARDENING_WORKSPACE_BUTTONS", false, "Change workspace edit buttons to reflect home gardening"); + public static final BooleanFlag ENABLE_TASKBAR_REVISED_THRESHOLDS = getDebugFlag( + "ENABLE_TASKBAR_REVISED_THRESHOLDS", false, + "Uses revised thresholds for transient taskbar."); + public static final BooleanFlag ENABLE_TRANSIENT_TASKBAR = getDebugFlag( "ENABLE_TRANSIENT_TASKBAR", false, "Enables transient taskbar.");