Loading packages/WallpaperCropper/src/com/android/gallery3d/common/BitmapUtils.java +3 −4 Original line number Original line Diff line number Diff line Loading @@ -23,7 +23,6 @@ import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Paint; import android.os.Build; import android.os.Build; import android.util.FloatMath; import android.util.Log; import android.util.Log; import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream; Loading Loading @@ -72,7 +71,7 @@ public class BitmapUtils { && minSideLength == UNCONSTRAINED) return 1; && minSideLength == UNCONSTRAINED) return 1; int lowerBound = (maxNumOfPixels == UNCONSTRAINED) ? 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) { if (minSideLength == UNCONSTRAINED) { return lowerBound; return lowerBound; Loading @@ -96,7 +95,7 @@ public class BitmapUtils { // Find the min x that 1 / x >= scale // Find the min x that 1 / x >= scale public static int computeSampleSizeLarger(float 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; if (initialSize <= 1) return 1; return initialSize <= 8 return initialSize <= 8 Loading @@ -107,7 +106,7 @@ public class BitmapUtils { // Find the max x that 1 / x <= scale. // Find the max x that 1 / x <= scale. public static int computeSampleSize(float scale) { public static int computeSampleSize(float scale) { Utils.assertTrue(scale > 0); 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 return initialSize <= 8 ? Utils.nextPowerOf2(initialSize) ? Utils.nextPowerOf2(initialSize) : (initialSize + 7) / 8 * 8; : (initialSize + 7) / 8 * 8; Loading core/java/android/gesture/GestureStroke.java +1 −1 File changed.Contains only whitespace changes. Show changes Loading
packages/WallpaperCropper/src/com/android/gallery3d/common/BitmapUtils.java +3 −4 Original line number Original line Diff line number Diff line Loading @@ -23,7 +23,6 @@ import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Paint; import android.os.Build; import android.os.Build; import android.util.FloatMath; import android.util.Log; import android.util.Log; import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream; Loading Loading @@ -72,7 +71,7 @@ public class BitmapUtils { && minSideLength == UNCONSTRAINED) return 1; && minSideLength == UNCONSTRAINED) return 1; int lowerBound = (maxNumOfPixels == UNCONSTRAINED) ? 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) { if (minSideLength == UNCONSTRAINED) { return lowerBound; return lowerBound; Loading @@ -96,7 +95,7 @@ public class BitmapUtils { // Find the min x that 1 / x >= scale // Find the min x that 1 / x >= scale public static int computeSampleSizeLarger(float 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; if (initialSize <= 1) return 1; return initialSize <= 8 return initialSize <= 8 Loading @@ -107,7 +106,7 @@ public class BitmapUtils { // Find the max x that 1 / x <= scale. // Find the max x that 1 / x <= scale. public static int computeSampleSize(float scale) { public static int computeSampleSize(float scale) { Utils.assertTrue(scale > 0); 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 return initialSize <= 8 ? Utils.nextPowerOf2(initialSize) ? Utils.nextPowerOf2(initialSize) : (initialSize + 7) / 8 * 8; : (initialSize + 7) / 8 * 8; Loading
core/java/android/gesture/GestureStroke.java +1 −1 File changed.Contains only whitespace changes. Show changes