From 7f47e6ced2f9305296eadd6ad8647ff92890890f Mon Sep 17 00:00:00 2001 From: Sascha Haeberling Date: Thu, 29 Aug 2013 17:28:49 -0700 Subject: 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 --- src/com/android/camera/data/LocalMediaData.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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(); -- cgit v1.2.3