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

Commit 1bb37acb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Don't allow swiping from overview to all apps in 3 button mode" into ub-launcher3-rvc-dev

parents cea3ed48 22757e84
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()