diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-05-12 08:35:49 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-05-12 08:35:49 -0700 |
commit | 5e90403e4f9dcc4c1dcd415bedadd9cc66a5b830 (patch) | |
tree | 8f4fe56ae445263c28609ed6e0534b96122bfd44 /app/src/main/java | |
parent | ec0fbf498e1506368a057a594d89a8fcbc6503ce (diff) | |
download | dsub-5e90403e4f9dcc4c1dcd415bedadd9cc66a5b830.tar.gz dsub-5e90403e4f9dcc4c1dcd415bedadd9cc66a5b830.tar.bz2 dsub-5e90403e4f9dcc4c1dcd415bedadd9cc66a5b830.zip |
Recycle small images too now that we use a Recycling fallback ImageView
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/util/ImageLoader.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/util/ImageLoader.java b/app/src/main/java/github/daneren2005/dsub/util/ImageLoader.java index 1a0e8242..7ba2064b 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/ImageLoader.java +++ b/app/src/main/java/github/daneren2005/dsub/util/ImageLoader.java @@ -88,10 +88,8 @@ public class ImageLoader { @Override protected void entryRemoved(boolean evicted, String key, Bitmap oldBitmap, Bitmap newBitmap) { if(evicted) { - if(oldBitmap != nowPlaying && key.indexOf("unknown") != 0 || clearingCache) { - if(sizeOf("", oldBitmap) > 500) { - oldBitmap.recycle(); - } + if(oldBitmap != nowPlaying || clearingCache) { + oldBitmap.recycle(); } else { cache.put(key, oldBitmap); } |