summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2015-03-15 14:10:23 -0700
committer Andreas Gampe <agampe@google.com> 2015-03-15 14:10:23 -0700
commit65ac8a2bd77015b4f77acc02276be1c6f07c78f5 (patch)
treebaf270872413d7990a5ed073378cd81c2980a8a4
parent30fcd2aa8a87ca97e1d6dbc3203c3a485a56dac9 (diff)
Frameworks/base: Fix missing cast
Without a cast, the division is integer division. Change-Id: I050e53778de8b1591a0be16ebbee8eed70eb1528
-rw-r--r--core/java/com/android/internal/view/animation/FallbackLUTInterpolator.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/com/android/internal/view/animation/FallbackLUTInterpolator.java b/core/java/com/android/internal/view/animation/FallbackLUTInterpolator.java
index 06838c90182b..526e2aef4799 100644
--- a/core/java/com/android/internal/view/animation/FallbackLUTInterpolator.java
+++ b/core/java/com/android/internal/view/animation/FallbackLUTInterpolator.java
@@ -45,7 +45,7 @@ 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(duration / animIntervalMs);
+ int numAnimFrames = (int) Math.ceil(((double) duration) / animIntervalMs);
float values[] = new float[numAnimFrames];
float lastFrame = numAnimFrames - 1;
for (int i = 0; i < numAnimFrames; i++) {