Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d72ac1a authored by Jon Miranda's avatar Jon Miranda
Browse files

Add revised thresholds for transient taskbar behind flag ENABLE_TASKBAR_REVISED_THRESHOLDS.

Bug: 260002412
Test: enable flag
Change-Id: I4d82a853061b1540b6c6aea5e58b05a3ea6638e0
parent 793c3715
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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>
+4 −1
Original line number Diff line number Diff line
@@ -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;
@@ -345,7 +346,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);

+4 −1
Original line number Diff line number Diff line
@@ -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;
+4 −1
Original line number Diff line number Diff line
@@ -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;

+3 −0
Original line number Diff line number Diff line
@@ -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>
Loading