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

Commit 8d725767 authored by Johannes Gallmann's avatar Johannes Gallmann
Browse files

Use custom interpolator for predictive back system animations

Bug: 332512902
Flag: ACONFIG com.android.window.flags.predictive_back_system_anims TRUNKFOOD
Test: Manual, i.e. analysing screenrecordings and verify that there are no more animation jumps at the start/end of the back animation
Change-Id: I1a95b4c5e3ba393798254f2c44911d7b80ae1fc1
parent 5f430310
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -258,6 +258,15 @@ public class Interpolators {
        }
    };

    /**
     * Use this interpolator for animating progress values coming from the back callback to get
     * the predictive-back-typical decelerate motion.
     *
     * This interpolator is similar to {@link Interpolators#STANDARD_DECELERATE} but has a slight
     * acceleration phase at the start.
     */
    public static final Interpolator BACK_GESTURE = new PathInterpolator(0.1f, 0.1f, 0f, 1f);

    private static final float FAST_FLING_PX_MS = 10;

    /*
+9 −0
Original line number Diff line number Diff line
@@ -264,6 +264,15 @@ public class InterpolatorsAndroidX {
        }
    };

    /**
     * Use this interpolator for animating progress values coming from the back callback to get
     * the predictive-back-typical decelerate motion.
     *
     * This interpolator is similar to {@link Interpolators#STANDARD_DECELERATE} but has a slight
     * acceleration phase at the start.
     */
    public static final Interpolator BACK_GESTURE = new PathInterpolator(0.1f, 0.1f, 0f, 1f);

    private static final float FAST_FLING_PX_MS = 10;

    /*