diff options
author | Neil Fuller <nfuller@google.com> | 2014-10-03 09:38:24 +0100 |
---|---|---|
committer | Neil Fuller <nfuller@google.com> | 2014-10-15 11:45:45 +0100 |
commit | 6de42dac4307a88fb99ced0a57293438600e3899 (patch) | |
tree | 0f2c58a8b69c3888686f6f25766b2af54f2ffbd3 /packages/WallpaperCropper | |
parent | ed583f5ed97c40951341d5750ecb73be6b10579f (diff) | |
download | frameworks_base-6de42dac4307a88fb99ced0a57293438600e3899.zip frameworks_base-6de42dac4307a88fb99ced0a57293438600e3899.tar.gz frameworks_base-6de42dac4307a88fb99ced0a57293438600e3899.tar.bz2 |
Removing some more FloatMath references
See frameworks/base commit 33253a4baa6279f81a73425b49dfb6abe5f5416e
for details.
Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: I46d4ee4c4be7972e3bcc6782fb50f024b6fff1ee
Diffstat (limited to 'packages/WallpaperCropper')
-rw-r--r-- | packages/WallpaperCropper/src/com/android/gallery3d/common/BitmapUtils.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/WallpaperCropper/src/com/android/gallery3d/common/BitmapUtils.java b/packages/WallpaperCropper/src/com/android/gallery3d/common/BitmapUtils.java index a671ed2..4e276db 100644 --- a/packages/WallpaperCropper/src/com/android/gallery3d/common/BitmapUtils.java +++ b/packages/WallpaperCropper/src/com/android/gallery3d/common/BitmapUtils.java @@ -23,7 +23,6 @@ import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; import android.os.Build; -import android.util.FloatMath; import android.util.Log; import java.io.ByteArrayOutputStream; @@ -72,7 +71,7 @@ public class BitmapUtils { && minSideLength == UNCONSTRAINED) return 1; int lowerBound = (maxNumOfPixels == UNCONSTRAINED) ? 1 : - (int) FloatMath.ceil(FloatMath.sqrt((float) (w * h) / maxNumOfPixels)); + (int) Math.ceil(Math.sqrt((double) (w * h) / maxNumOfPixels)); if (minSideLength == UNCONSTRAINED) { return lowerBound; @@ -96,7 +95,7 @@ public class BitmapUtils { // Find the min x that 1 / x >= scale public static int computeSampleSizeLarger(float scale) { - int initialSize = (int) FloatMath.floor(1f / scale); + int initialSize = (int) Math.floor(1 / scale); if (initialSize <= 1) return 1; return initialSize <= 8 @@ -107,7 +106,7 @@ public class BitmapUtils { // Find the max x that 1 / x <= scale. public static int computeSampleSize(float scale) { Utils.assertTrue(scale > 0); - int initialSize = Math.max(1, (int) FloatMath.ceil(1 / scale)); + int initialSize = Math.max(1, (int) Math.ceil(1 / scale)); return initialSize <= 8 ? Utils.nextPowerOf2(initialSize) : (initialSize + 7) / 8 * 8; |