Generalize SpringObjectAnimator.

This is in preparation for adding more springs to the state transitions.

Bug: 111698021
Change-Id: I32cd7894e940dae00895799280b244d68400d374
This commit is contained in:
Jon Miranda
2019-01-16 15:15:56 -08:00
parent 982ff0714f
commit 60adc3fb83
4 changed files with 69 additions and 54 deletions
@@ -21,6 +21,7 @@ import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY;
import static com.android.launcher3.LauncherState.BACKGROUND_APP;
import static com.android.launcher3.LauncherState.FAST_OVERVIEW;
import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.allapps.AllAppsTransitionController.ALL_APPS_PROGRESS_SPRING;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.states.RotationHelper.REQUEST_LOCK;
import static com.android.quickstep.TouchConsumer.INTERACTION_NORMAL;
@@ -295,7 +296,8 @@ public interface ActivityControlHelper<T extends BaseDraggingActivity> {
AnimatorSet anim = new AnimatorSet();
if (!activity.getDeviceProfile().isVerticalBarLayout()) {
Animator shiftAnim = new SpringObjectAnimator(activity.getAllAppsController(),
Animator shiftAnim = new SpringObjectAnimator<>(activity.getAllAppsController(),
ALL_APPS_PROGRESS_SPRING, "allAppsSpringFromACH",
activity.getAllAppsController().getShiftRange(),
fromState.getVerticalProgress(activity),
endState.getVerticalProgress(activity));