diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-01-29 16:56:17 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-01-29 16:56:17 -0800 |
commit | 35a7ef766ea4aeed4bfe0251af3917103b12eebd (patch) | |
tree | 912f065224317c6154b79dda4dc4b8c0206d932a /src | |
parent | 0f37d614b07f9bd9ced404330c52e290104b649c (diff) | |
download | dsub-35a7ef766ea4aeed4bfe0251af3917103b12eebd.tar.gz dsub-35a7ef766ea4aeed4bfe0251af3917103b12eebd.tar.bz2 dsub-35a7ef766ea4aeed4bfe0251af3917103b12eebd.zip |
Just revert recent changes to ImageLoader. Go back to caching unknown images, and only keep the no entry unknowns
Diffstat (limited to 'src')
-rw-r--r-- | src/github/daneren2005/dsub/util/ImageLoader.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/util/ImageLoader.java b/src/github/daneren2005/dsub/util/ImageLoader.java index 2df8802d..af37e145 100644 --- a/src/github/daneren2005/dsub/util/ImageLoader.java +++ b/src/github/daneren2005/dsub/util/ImageLoader.java @@ -80,7 +80,6 @@ public class ImageLoader { imageSizeLarge = Math.round(Math.min(metrics.widthPixels, metrics.heightPixels)); avatarSizeDefault = context.getResources().getDrawable(R.drawable.ic_social_person).getIntrinsicHeight(); - final String UNKOWN_KEEP_PART = getKey("unknown", imageSizeDefault); cache = new LruCache<String, Bitmap>(cacheSize) { @Override protected int sizeOf(String key, Bitmap bitmap) { @@ -90,7 +89,7 @@ public class ImageLoader { @Override protected void entryRemoved(boolean evicted, String key, Bitmap oldBitmap, Bitmap newBitmap) { if(evicted) { - if(oldBitmap != nowPlaying && key.indexOf(UNKOWN_KEEP_PART) == -1 || clearingCache) { + if(oldBitmap != nowPlaying && key.indexOf("unknown") != 0 || clearingCache) { if(sizeOf("", oldBitmap) > 500) { oldBitmap.recycle(); } |