aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-05-12 08:35:49 -0700
committerScott Jackson <daneren2005@gmail.com>2015-05-12 08:35:49 -0700
commit5e90403e4f9dcc4c1dcd415bedadd9cc66a5b830 (patch)
tree8f4fe56ae445263c28609ed6e0534b96122bfd44 /app/src/main/java
parentec0fbf498e1506368a057a594d89a8fcbc6503ce (diff)
downloaddsub-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.java6
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);
}