diff options
author | Elektroschmock <elektroschmock78@googlemail.com> | 2015-06-10 22:29:40 +0200 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2015-06-15 17:16:28 +0000 |
commit | 92bffe8c9ac8e8f235b7a5f8d7208957d286a844 (patch) | |
tree | 7f99e67faa7e290004a42ddeb14fcc65ebfc2535 /src/com/android/launcher3/LauncherScroller.java | |
parent | f4182190f49a6520dd23825e86138bb17821c96d (diff) | |
download | android_packages_apps_Trebuchet-92bffe8c9ac8e8f235b7a5f8d7208957d286a844.tar.gz android_packages_apps_Trebuchet-92bffe8c9ac8e8f235b7a5f8d7208957d286a844.tar.bz2 android_packages_apps_Trebuchet-92bffe8c9ac8e8f235b7a5f8d7208957d286a844.zip |
Trebuchet: FloatMath is deprecated in API22
Change-Id: Icbb1cd06d3965a741061554ac641d41d2116c692
Diffstat (limited to 'src/com/android/launcher3/LauncherScroller.java')
-rw-r--r-- | src/com/android/launcher3/LauncherScroller.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/com/android/launcher3/LauncherScroller.java b/src/com/android/launcher3/LauncherScroller.java index 3bd0a78c4..a9b49556b 100644 --- a/src/com/android/launcher3/LauncherScroller.java +++ b/src/com/android/launcher3/LauncherScroller.java @@ -20,7 +20,6 @@ import android.animation.TimeInterpolator; import android.content.Context; import android.hardware.SensorManager; import android.os.Build; -import android.util.FloatMath; import android.view.ViewConfiguration; import android.view.animation.AnimationUtils; import android.view.animation.Interpolator; @@ -409,7 +408,7 @@ public class LauncherScroller { float dx = (float) (mFinalX - mStartX); float dy = (float) (mFinalY - mStartY); - float hyp = FloatMath.sqrt(dx * dx + dy * dy); + float hyp = (float) Math.hypot(dx, dy); float ndx = dx / hyp; float ndy = dy / hyp; @@ -426,7 +425,7 @@ public class LauncherScroller { mMode = FLING_MODE; mFinished = false; - float velocity = FloatMath.sqrt(velocityX * velocityX + velocityY * velocityY); + float velocity = (float) Math.hypot(velocityX, velocityY); mVelocity = velocity; mDuration = getSplineFlingDuration(velocity); |