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

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

Merge "Always return RecentsView to translation 0 on drag end" into ub-launcher3-rvc-dev

parents 1bb37acb 6a6301c5
Loading
Loading
Loading
Loading
+17 −16
Original line number Diff line number Diff line
@@ -166,8 +166,8 @@ public class NoButtonNavbarToOverviewTouchController extends FlingAndHoldTouchCo
        float velocityDp = dpiFromPx(velocity);
        boolean isFling = Math.abs(velocityDp) > 1;
        LauncherStateManager stateManager = mLauncher.getStateManager();
        if (isFling) {
            // When flinging, go back to home instead of overview.
        boolean goToHomeInsteadOfOverview = isFling;
        if (goToHomeInsteadOfOverview) {
            if (velocity > 0) {
                stateManager.goToState(NORMAL, true,
                        () -> onSwipeInteractionCompleted(NORMAL, Touch.FLING));
@@ -187,7 +187,7 @@ public class NoButtonNavbarToOverviewTouchController extends FlingAndHoldTouchCo
                        () -> onSwipeInteractionCompleted(NORMAL, Touch.SWIPE)));
                anim.start();
            }
        } else {
        }
        if (mReachedOverview) {
            float distanceDp = dpiFromPx(Math.max(
                    Math.abs(mRecentsView.getTranslationX()),
@@ -199,8 +199,9 @@ public class NoButtonNavbarToOverviewTouchController extends FlingAndHoldTouchCo
                    .translationY(0)
                    .setInterpolator(ACCEL_DEACCEL)
                    .setDuration(duration)
                        .withEndAction(this::maybeSwipeInteractionToOverviewComplete);
            }
                    .withEndAction(goToHomeInsteadOfOverview
                            ? null
                            : this::maybeSwipeInteractionToOverviewComplete);
        }
    }