Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42902e3f authored by Johannes Gallmann's avatar Johannes Gallmann
Browse files

Slightly adjust spring force for 3-button-nav predictive back

Bug: 373544911
Test: Manual, i.e. verified that common back animations feel smoother with the updated spring force.
Flag: com.android.window.flags.predictive_back_three_button_nav
Change-Id: I193fb3925b8653b8ae28b914da38124b9d3f0ca4
parent c60efe59
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ public class BackProgressAnimator implements DynamicAnimation.OnAnimationUpdateL
     */
    private static final float SCALE_FACTOR = 100f;
    private static final float FLING_FRICTION = 8f;
    private static final float BUTTON_SPRING_STIFFNESS = 100;
    private final SpringAnimation mSpring;
    private ProgressCallback mCallback;
    private float mProgress = 0;
@@ -156,7 +157,7 @@ public class BackProgressAnimator implements DynamicAnimation.OnAnimationUpdateL
                /* frameTime */ System.nanoTime() / TimeUtils.NANOS_PER_MS);
        if (predictiveBackSwipeEdgeNoneApi()) {
            if (event.getSwipeEdge() == EDGE_NONE) {
                mButtonSpringForce.setStiffness(SpringForce.STIFFNESS_LOW);
                mButtonSpringForce.setStiffness(BUTTON_SPRING_STIFFNESS);
                mSpring.setSpring(mButtonSpringForce);
                mSpring.animateToFinalPosition(SCALE_FACTOR);
            } else {