Merge "resolve merge conflicts of 3a22956f0a to ub-launcher3-master" into ub-launcher3-master

This commit is contained in:
TreeHugger Robot 2020-08-10 16:28:35 +00:00 committed by Android (Google) Code Review
commit d728579504
1 changed files with 8 additions and 1 deletions

View File

@ -2354,7 +2354,14 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
if (pageIndex == -1) {
return 0;
}
return getScrollForPage(pageIndex) - mOrientationHandler.getPrimaryScroll(this);
// Unbound the scroll (due to overscroll) if the adjacent tasks are offset away from it.
// This allows the page to move freely, given there's no visual indication why it shouldn't.
int boundedScroll = mOrientationHandler.getPrimaryScroll(this);
int unboundedScroll = getUnboundedScroll();
float unboundedProgress = mAdjacentPageOffset;
int scroll = Math.round(unboundedScroll * unboundedProgress
+ boundedScroll * (1 - unboundedProgress));
return getScrollForPage(pageIndex) - scroll;
}
public Consumer<MotionEvent> getEventDispatcher(float navbarRotation) {