mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Merge "Add revised thresholds for transient taskbar behind flag ENABLE_TASKBAR_REVISED_THRESHOLDS." into tm-qpr-dev
This commit is contained in:
@@ -292,10 +292,14 @@
|
||||
<!-- An additional touch slop to prevent x-axis movement during the swipe up to show taskbar -->
|
||||
<dimen name="transient_taskbar_clamped_offset_bound">16dp</dimen>
|
||||
<!-- Taskbar swipe up thresholds -->
|
||||
<dimen name="taskbar_nav_threshold">40dp</dimen>
|
||||
<dimen name="taskbar_app_window_threshold">150dp</dimen>
|
||||
<dimen name="taskbar_home_overview_threshold">225dp</dimen>
|
||||
<dimen name="taskbar_catch_up_threshold">300dp</dimen>
|
||||
<dimen name="taskbar_nav_threshold">40dp</dimen>
|
||||
|
||||
<dimen name="taskbar_nav_threshold_v2">30dp</dimen>
|
||||
<dimen name="taskbar_app_window_threshold_v2">100dp</dimen>
|
||||
<dimen name="taskbar_home_overview_threshold_v2">200dp</dimen>
|
||||
|
||||
<!-- Taskbar 3 button spacing -->
|
||||
<dimen name="taskbar_button_space_inbetween">24dp</dimen>
|
||||
|
||||
@@ -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<T extends StatefulActivity<S>,
|
||||
|
||||
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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -388,6 +388,9 @@
|
||||
<dimen name="taskbar_app_window_threshold">0dp</dimen>
|
||||
<dimen name="taskbar_home_overview_threshold">0dp</dimen>
|
||||
<dimen name="taskbar_catch_up_threshold">0dp</dimen>
|
||||
<dimen name="taskbar_nav_threshold_v2">0dp</dimen>
|
||||
<dimen name="taskbar_app_window_threshold_v2">0dp</dimen>
|
||||
<dimen name="taskbar_home_overview_threshold_v2">0dp</dimen>
|
||||
|
||||
<!-- Size of the maximum radius for the enforced rounded rectangles. -->
|
||||
<dimen name="enforced_rounded_corner_max_radius">16dp</dimen>
|
||||
|
||||
@@ -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.");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user