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
This commit is contained in:
Alex Chau
2021-05-17 13:32:39 +01:00
parent 360793ed01
commit 58367f5346
@@ -377,7 +377,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
private final PointF mTempPointF = new PointF();
private final float[] mTempFloat = new float[1];
private final List<OnScrollChangedListener> mScrollListeners = new ArrayList<>();
private float mFullscreenScale;
private static final int DISMISS_TASK_DURATION = 300;
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.
float widthDiff =
taskView.getLayoutParams().width * (1 - taskView.getFullscreenScale());
// Compensate page spacing widening caused by RecentsView scaling.
widthDiff += mPageSpacing * (1 - 1 / mFullscreenScale);
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
getTaskSize(mTempRect);
mFullscreenScale = getPagedViewOrientedState().getFullScreenScaleAndPivot(
mTempRect, mActivity.getDeviceProfile(), mTempPointF);
getPagedViewOrientedState().getFullScreenScaleAndPivot(mTempRect,
mActivity.getDeviceProfile(), mTempPointF);
setPivotX(mTempPointF.x);
setPivotY(mTempPointF.y);
setTaskModalness(mTaskModalness);