Merge "Fix window x-axis movement after gesture ends." into tm-qpr-dev am: 12053e958f am: fb6fe0ce82

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20590521

Change-Id: I8c2ae63af9a2c768e3cc586ce808775fbec62c15
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jon Miranda
2022-12-02 03:31:14 +00:00
committed by Automerger Merge Worker
2 changed files with 11 additions and 9 deletions
@@ -1201,7 +1201,6 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
final GestureEndTarget endTarget = calculateEndTarget(velocity, endVelocity,
isFling, isCancel);
setClampScrollOffset(false);
// Set the state, but don't notify until the animation completes
mGestureState.setEndTarget(endTarget, false /* isAtomic */);
mAnimationFactory.setEndTarget(endTarget);
@@ -1279,13 +1278,16 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
// Let RecentsView handle the scrolling to the task, which we launch in startNewTask()
// or resumeLastTask().
Runnable onPageTransitionEnd = () -> {
mGestureState.setState(STATE_RECENTS_SCROLLING_FINISHED);
setClampScrollOffset(false);
};
if (mRecentsView != null) {
ActiveGestureLog.INSTANCE.trackEvent(ActiveGestureErrorDetector.GestureEvent
.SET_ON_PAGE_TRANSITION_END_CALLBACK);
mRecentsView.setOnPageTransitionEndCallback(
() -> mGestureState.setState(STATE_RECENTS_SCROLLING_FINISHED));
mRecentsView.setOnPageTransitionEndCallback(onPageTransitionEnd);
} else {
mGestureState.setState(STATE_RECENTS_SCROLLING_FINISHED);
onPageTransitionEnd.run();
}
animateToProgress(startShift, endShift, duration, interpolator, endTarget, velocity);