diff options
| author | Owen Lin <owenlin@google.com> | 2011-09-13 20:48:13 +0800 |
|---|---|---|
| committer | Wei Huang <weih@google.com> | 2011-09-19 16:22:44 -0700 |
| commit | 5da31f8fd85d7c1e33133473bd1fbc5e3a240f2d (patch) | |
| tree | 3690848c45031b1417fa5325ec94c0f879dbd850 /gallerycommon/src | |
| parent | d2ee3f2ac4bf9faed16b8007efe8daf6ef4edcac (diff) | |
| download | android_packages_apps_Gallery2-5da31f8fd85d7c1e33133473bd1fbc5e3a240f2d.tar.gz android_packages_apps_Gallery2-5da31f8fd85d7c1e33133473bd1fbc5e3a240f2d.tar.bz2 android_packages_apps_Gallery2-5da31f8fd85d7c1e33133473bd1fbc5e3a240f2d.zip | |
Add a hard limit on the size of the widget images.
There is a limit on the size of the data transfered by binder.
For now, we just add a hard limit (360 pixel) to ensure the widget's image
can be passed by binder.
Also adjust the size of widget to make it looks better.
Fix a bug in DecodeUtils which cause OOM for a image in size 12200x1920.
In that case, we should generate a screen nail of size 640x101 instead of
4066x640.
Change-Id: Ia8227d8e5368471fe7af94bf164d67017aa321fa
fix: 5273271
Diffstat (limited to 'gallerycommon/src')
| -rw-r--r-- | gallerycommon/src/com/android/gallery3d/common/BitmapUtils.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gallerycommon/src/com/android/gallery3d/common/BitmapUtils.java b/gallerycommon/src/com/android/gallery3d/common/BitmapUtils.java index aaf4f6665..060d7f32e 100644 --- a/gallerycommon/src/com/android/gallery3d/common/BitmapUtils.java +++ b/gallerycommon/src/com/android/gallery3d/common/BitmapUtils.java @@ -85,7 +85,7 @@ public class BitmapUtils { // minSideLength long. If that's not possible, return 1. public static int computeSampleSizeLarger(int w, int h, int minSideLength) { - int initialSize = Math.min(w / minSideLength, h / minSideLength); + int initialSize = Math.max(w / minSideLength, h / minSideLength); if (initialSize <= 1) return 1; return initialSize <= 8 |
