diff options
author | Chih-Chung Chang <chihchung@google.com> | 2012-02-22 08:00:31 +0800 |
---|---|---|
committer | Chih-Chung Chang <chihchung@google.com> | 2012-02-23 09:15:21 +0800 |
commit | 980724bab5c59526803b302ccba25a9f50f27d1c (patch) | |
tree | 6a752d52444829ee1dd5678eb2cdd06af9a063ee /src/com/android/gallery3d/util/GalleryUtils.java | |
parent | be55f1e81c6021cf499c24331088fb01a8db9f91 (diff) | |
download | android_packages_apps_Snap-980724bab5c59526803b302ccba25a9f50f27d1c.tar.gz android_packages_apps_Snap-980724bab5c59526803b302ccba25a9f50f27d1c.tar.bz2 android_packages_apps_Snap-980724bab5c59526803b302ccba25a9f50f27d1c.zip |
Remove unused code.
Change-Id: I167596ab023671651df298ddb2b80b7c782f4223
Diffstat (limited to 'src/com/android/gallery3d/util/GalleryUtils.java')
-rw-r--r-- | src/com/android/gallery3d/util/GalleryUtils.java | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/com/android/gallery3d/util/GalleryUtils.java b/src/com/android/gallery3d/util/GalleryUtils.java index fcb27bad4..9a7e09316 100644 --- a/src/com/android/gallery3d/util/GalleryUtils.java +++ b/src/com/android/gallery3d/util/GalleryUtils.java @@ -324,31 +324,6 @@ public class GalleryUtils { return false; } - public static void assertInMainThread() { - if (Thread.currentThread() == sContext.getMainLooper().getThread()) { - throw new AssertionError(); - } - } - - public static void doubleToRational(double value, long[] output) { - // error is a magic number to control the tollerance of error - doubleToRational(value, output, 0.00001); - } - - private static void doubleToRational(double value, long[] output, double error) { - long number = (long) value; - value -= number; - if (value < 0.000001 || error > 1) { - output[0] = (int) (number + value + 0.5); - output[1] = 1; - } else { - doubleToRational(1.0 / value, output, error / value); - number = number * output[0] + output[1]; - output[1] = output[0]; - output[0] = number; - } - } - public static boolean isPanorama(MediaItem item) { if (item == null) return false; int w = item.getWidth(); |