Enable working springs. Move unstable springs to a seperate feature flag.

Bug: 147302669
Change-Id: I7a1b9b0e68cc68ad943b5af2b8cf7f80b5680eaa
This commit is contained in:
Jon Miranda
2020-01-07 11:22:51 -08:00
parent 0fd48b51ba
commit 40f0eb2188
8 changed files with 25 additions and 15 deletions

View File

@@ -11,10 +11,12 @@ import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_VERTICAL_PROGRE
import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.anim.PropertySetter.NO_ANIM_PROPERTY_SETTER;
import static com.android.launcher3.config.FeatureFlags.UNSTABLE_SPRINGS;
import static com.android.launcher3.util.SystemUiController.UI_STATE_ALL_APPS;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.util.FloatProperty;
import android.view.animation.Interpolator;
@@ -183,8 +185,11 @@ public class AllAppsTransitionController implements StateHandler, OnDeviceProfil
}
public Animator createSpringAnimation(float... progressValues) {
return new SpringObjectAnimator<>(this, ALL_APPS_PROGRESS, 1f / mShiftRange,
SPRING_DAMPING_RATIO, SPRING_STIFFNESS, progressValues);
if (UNSTABLE_SPRINGS.get()) {
return new SpringObjectAnimator<>(this, ALL_APPS_PROGRESS, 1f / mShiftRange,
SPRING_DAMPING_RATIO, SPRING_STIFFNESS, progressValues);
}
return ObjectAnimator.ofFloat(this, ALL_APPS_PROGRESS, progressValues);
}
private void setAlphas(LauncherState toState, AnimationConfig config,