summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Haeberling <haeberling@google.com>2013-08-29 17:28:49 -0700
committerSascha Häberling <haeberling@google.com>2013-08-30 00:47:35 +0000
commit7f47e6ced2f9305296eadd6ad8647ff92890890f (patch)
tree75ce473daf1d1ea65e189279a838cd80b5c0bf33
parent8890194726507573fd230fba7d4042ed00b363e4 (diff)
downloadandroid_packages_apps_Snap-7f47e6ced2f9305296eadd6ad8647ff92890890f.tar.gz
android_packages_apps_Snap-7f47e6ced2f9305296eadd6ad8647ff92890890f.tar.bz2
android_packages_apps_Snap-7f47e6ced2f9305296eadd6ad8647ff92890890f.zip
Fix of memory issues with bitmaps in filmstrip.
Bug: 10495593 We should use the bigger scale factor of the two, and not the smaller. Change-Id: I5a1ff6fe7d6b50c0128ff17709daa94cef9cb65b
-rw-r--r--src/com/android/camera/data/LocalMediaData.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/camera/data/LocalMediaData.java b/src/com/android/camera/data/LocalMediaData.java
index f692cbcc0..9391892b1 100644
--- a/src/com/android/camera/data/LocalMediaData.java
+++ b/src/com/android/camera/data/LocalMediaData.java
@@ -471,7 +471,7 @@ public abstract class LocalMediaData implements LocalData {
if (mWidth > mDecodeWidth || mHeight > mDecodeHeight) {
int heightRatio = Math.round((float) mHeight / (float) mDecodeHeight);
int widthRatio = Math.round((float) mWidth / (float) mDecodeWidth);
- sampleSize = heightRatio < widthRatio ? heightRatio : widthRatio;
+ sampleSize = Math.max(heightRatio, widthRatio);
}
BitmapFactory.Options opts = new BitmapFactory.Options();