Snap for 7666971 from c8295216d5 to sc-v2-release

Change-Id: I936025ca9a50d3b161a173bb27c6a16e3830de36
This commit is contained in:
Android Build Coastguard Worker
2021-08-23 23:10:03 +00:00
@@ -1996,7 +1996,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
TaskViewSimulator[] taskViewSimulators) {
mCurrentGestureEndTarget = endTarget;
if (endTarget == GestureState.GestureEndTarget.RECENTS) {
setEnableFreeScroll(true);
updateGridProperties();
}
@@ -3452,8 +3451,11 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
boolean isStartShift;
if (midpointIndex > -1) {
// When there is a midpoint reference task, adjacent tasks have less distance to travel
// to reach offscreen. Offset the task position to the task's starting point.
int midpointScroll = getScrollForPage(midpointIndex);
// to reach offscreen. Offset the task position to the task's starting point, and offset
// by current page's scroll diff.
int midpointScroll = getScrollForPage(midpointIndex)
+ mOrientationHandler.getPrimaryScroll(this) - getScrollForPage(mCurrentPage);
getPersistentChildPosition(midpointIndex, midpointScroll, taskPosition);
float midpointStart = mOrientationHandler.getStart(taskPosition);