Revert "Revert "Add spring to shelf for home <-> overview <-> all apps state transitions.""

This reverts commit 2bdac8f7e5.

Reason for revert: Reverting and added fix to crash

Change-Id: I20508eb05c85ba5dfba52630aa9becea270f890b
This commit is contained in:
Jon Miranda
2019-01-08 16:01:57 -08:00
parent 1ff1231baf
commit 7e390c3b17
8 changed files with 422 additions and 25 deletions

View File

@@ -24,6 +24,7 @@ import static com.android.launcher3.LauncherStateManager.ATOMIC_COMPONENT;
import static com.android.launcher3.LauncherStateManager.NON_ATOMIC_COMPONENT;
import static com.android.launcher3.Utilities.SINGLE_FRAME_MS;
import static com.android.launcher3.anim.Interpolators.scrollInterpolatorForVelocity;
import static com.android.launcher3.config.FeatureFlags.QUICKSTEP_SPRINGS;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
@@ -45,6 +46,7 @@ import com.android.launcher3.anim.AnimationSuccessListener;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.anim.AnimatorSetBuilder;
import com.android.launcher3.compat.AccessibilityManagerCompat;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch;
@@ -428,8 +430,8 @@ public abstract class AbstractStateChangeTouchController
maybeUpdateAtomicAnim(mFromState, targetState, targetState == mToState ? 1f : 0f);
updateSwipeCompleteAnimation(anim, Math.max(duration, getRemainingAtomicDuration()),
targetState, velocity, fling);
mCurrentAnimation.dispatchOnStart();
if (fling && targetState == LauncherState.ALL_APPS) {
mCurrentAnimation.dispatchOnStartWithVelocity(endProgress, velocity);
if (fling && targetState == LauncherState.ALL_APPS && !QUICKSTEP_SPRINGS.get()) {
mLauncher.getAppsView().addSpringFromFlingUpdateListener(anim, velocity);
}
anim.start();