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

Commit 58367f53 authored by Alex Chau's avatar Alex Chau
Browse files

Removed page spacing scaling

- Removed page spacing scaling as it casuses page jump problem without too much benefit, as the RecnetView's fullscale is less significant now (see b/187839470)

Fixes: 184262404
Test: Swipe up after quick switching
Change-Id: I1e080aa2d6530fdac120426ff4b92e19e128ec30
parent 360793ed
Loading
Loading
Loading
Loading
+2 −5
Original line number Original line Diff line number Diff line
@@ -377,7 +377,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
    private final PointF mTempPointF = new PointF();
    private final PointF mTempPointF = new PointF();
    private final float[] mTempFloat = new float[1];
    private final float[] mTempFloat = new float[1];
    private final List<OnScrollChangedListener> mScrollListeners = new ArrayList<>();
    private final List<OnScrollChangedListener> mScrollListeners = new ArrayList<>();
    private float mFullscreenScale;


    private static final int DISMISS_TASK_DURATION = 300;
    private static final int DISMISS_TASK_DURATION = 300;
    private static final int DISMISS_TASK_TRANSLATION_DURATION = 200;
    private static final int DISMISS_TASK_TRANSLATION_DURATION = 200;
@@ -1350,8 +1349,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
            // Compensate space caused by TaskView scaling.
            // Compensate space caused by TaskView scaling.
            float widthDiff =
            float widthDiff =
                    taskView.getLayoutParams().width * (1 - taskView.getFullscreenScale());
                    taskView.getLayoutParams().width * (1 - taskView.getFullscreenScale());
            // Compensate page spacing widening caused by RecentsView scaling.
            widthDiff += mPageSpacing * (1 - 1 / mFullscreenScale);
            accumulatedTranslationX += mIsRtl ? widthDiff : -widthDiff;
            accumulatedTranslationX += mIsRtl ? widthDiff : -widthDiff;
        }
        }


@@ -2726,8 +2723,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T


        // Update the pivots such that when the task is scaled, it fills the full page
        // Update the pivots such that when the task is scaled, it fills the full page
        getTaskSize(mTempRect);
        getTaskSize(mTempRect);
        mFullscreenScale = getPagedViewOrientedState().getFullScreenScaleAndPivot(
        getPagedViewOrientedState().getFullScreenScaleAndPivot(mTempRect,
                mTempRect, mActivity.getDeviceProfile(), mTempPointF);
                mActivity.getDeviceProfile(), mTempPointF);
        setPivotX(mTempPointF.x);
        setPivotX(mTempPointF.x);
        setPivotY(mTempPointF.y);
        setPivotY(mTempPointF.y);
        setTaskModalness(mTaskModalness);
        setTaskModalness(mTaskModalness);