From 60cd635f6d76e0e2484852555845e5ac6a5848bb Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Tue, 1 Apr 2014 18:20:02 -0700 Subject: Don't try to recycle small size bitmaps --- src/github/daneren2005/dsub/util/ImageLoader.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/github/daneren2005/dsub/util/ImageLoader.java b/src/github/daneren2005/dsub/util/ImageLoader.java index 37727891..c3008b3a 100644 --- a/src/github/daneren2005/dsub/util/ImageLoader.java +++ b/src/github/daneren2005/dsub/util/ImageLoader.java @@ -72,7 +72,9 @@ public class ImageLoader { protected void entryRemoved(boolean evicted, String key, Bitmap oldBitmap, Bitmap newBitmap) { if(evicted) { if(oldBitmap != nowPlaying) { - oldBitmap.recycle(); + if(sizeOf("", oldBitmap) > 500) { + oldBitmap.recycle(); + } } else { cache.put(key, oldBitmap); } -- cgit v1.2.3