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

Commit 22757e84 authored by Tony Wickham's avatar Tony Wickham
Browse files

Don't allow swiping from overview to all apps in 3 button mode

Bug: 154761926
Change-Id: I155faec27f3b96e2f11aaec318d6846a893885e6
parent cee56f03
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -22,10 +22,12 @@ import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.anim.Interpolators.ACCEL;
import static com.android.launcher3.anim.Interpolators.DEACCEL;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_ACTIONS;
import static com.android.launcher3.config.FeatureFlags.UNSTABLE_SPRINGS;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_ALL_APPS_FADE;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_FADE;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_VERTICAL_PROGRESS;
import static com.android.quickstep.SysUINavigationMode.removeShelfFromOverview;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED;

import android.animation.TimeInterpolator;
@@ -132,7 +134,12 @@ public class PortraitStatesTouchController extends AbstractStateChangeTouchContr
            return TouchInteractionService.isConnected() ?
                    mLauncher.getStateManager().getLastState() : NORMAL;
        } else if (fromState == OVERVIEW) {
            return isDragTowardPositive ? ALL_APPS : NORMAL;
            LauncherState positiveDragTarget = ALL_APPS;
            if (ENABLE_OVERVIEW_ACTIONS.get() && removeShelfFromOverview(mLauncher)) {
                // Don't allow swiping up to all apps.
                positiveDragTarget = OVERVIEW;
            }
            return isDragTowardPositive ? positiveDragTarget : NORMAL;
        } else if (fromState == NORMAL && isDragTowardPositive) {
            int stateFlags = SystemUiProxy.INSTANCE.get(mLauncher).getLastSystemUiStateFlags();
            return mAllowDragToOverview && TouchInteractionService.isConnected()