From d4a60b394f4fb3aa27f05e1df0c09508794d0545 Mon Sep 17 00:00:00 2001 From: Brandon Dayauon Date: Thu, 11 Aug 2022 19:46:51 +0000 Subject: [PATCH] Fix jumpiness when dragging surface down and up. Currently the overshoot only works when you first open all apps and try to extend the all apps to the top (making it overshoot). This pull works when you go mFromState:Normal -> mToState:AllApps. However once the all apps is set and you move the surface down then up..that overshoot animation jumps AFTER your finger goes all the way up and off the screen. At this point, once all apps is completely opened.. the states are mFromState:AllApps -> mToState:Normal. Now with this change, it addresses the jumpiness by considering the current states (mFromState==AllApps) by including the same onPull() but with different calculations bug: 240669628 test: manual - videos included in bug thread Change-Id: I7873f1ec22574f87fab3d2f11d1f5a5f81dfb5bc --- .../launcher3/touch/AbstractStateChangeTouchController.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java index 09b8228182..8f7a4ecfd1 100644 --- a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java +++ b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java @@ -32,6 +32,7 @@ import static com.android.launcher3.util.window.RefreshRateTracker.getSingleFram import android.animation.Animator.AnimatorListener; import android.animation.ValueAnimator; +import android.util.Log; import android.view.MotionEvent; import com.android.launcher3.Launcher; @@ -211,6 +212,10 @@ public abstract class AbstractStateChangeTouchController mFlingBlockCheck.blockFling(); } } + if (mFromState == LauncherState.ALL_APPS) { + mAllAppsOvershootStarted = true; + mLauncher.getAppsView().onPull(-progress , -progress); + } } else if (progress >= 1) { if (reinitCurrentAnimation(true, isDragTowardPositive)) { mDisplacementShift = displacement;