Loading core/java/com/android/internal/view/animation/FallbackLUTInterpolator.java +2 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,8 @@ public class FallbackLUTInterpolator implements NativeInterpolatorFactory, TimeI private static float[] createLUT(TimeInterpolator interpolator, long duration) { long frameIntervalNanos = Choreographer.getInstance().getFrameIntervalNanos(); int animIntervalMs = (int) (frameIntervalNanos / TimeUtils.NANOS_PER_MS); int numAnimFrames = (int) Math.ceil(((double) duration) / animIntervalMs); // We need 2 frame values as the minimal. int numAnimFrames = Math.max(2, (int) Math.ceil(((double) duration) / animIntervalMs)); float values[] = new float[numAnimFrames]; float lastFrame = numAnimFrames - 1; for (int i = 0; i < numAnimFrames; i++) { Loading Loading
core/java/com/android/internal/view/animation/FallbackLUTInterpolator.java +2 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,8 @@ public class FallbackLUTInterpolator implements NativeInterpolatorFactory, TimeI private static float[] createLUT(TimeInterpolator interpolator, long duration) { long frameIntervalNanos = Choreographer.getInstance().getFrameIntervalNanos(); int animIntervalMs = (int) (frameIntervalNanos / TimeUtils.NANOS_PER_MS); int numAnimFrames = (int) Math.ceil(((double) duration) / animIntervalMs); // We need 2 frame values as the minimal. int numAnimFrames = Math.max(2, (int) Math.ceil(((double) duration) / animIntervalMs)); float values[] = new float[numAnimFrames]; float lastFrame = numAnimFrames - 1; for (int i = 0; i < numAnimFrames; i++) { Loading