aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-04-01 18:20:02 -0700
committerScott Jackson <daneren2005@gmail.com>2014-04-01 18:20:02 -0700
commit60cd635f6d76e0e2484852555845e5ac6a5848bb (patch)
tree806ada2757c0e6bba49d51639c5fdf32c88558e1 /src
parent73b5aa504418ddd8bb74318714b96629e9421b9e (diff)
downloaddsub-60cd635f6d76e0e2484852555845e5ac6a5848bb.tar.gz
dsub-60cd635f6d76e0e2484852555845e5ac6a5848bb.tar.bz2
dsub-60cd635f6d76e0e2484852555845e5ac6a5848bb.zip
Don't try to recycle small size bitmaps
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/util/ImageLoader.java4
1 files changed, 3 insertions, 1 deletions
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);
}