Commit 9268a12a authored by Geoffrey Métais's avatar Geoffrey Métais

no bitmap reuse before HoneyComb

parent 05158b4a
...@@ -84,7 +84,7 @@ public class BitmapCache { ...@@ -84,7 +84,7 @@ public class BitmapCache {
protected void entryRemoved(boolean evicted, String key, CacheableBitmap oldValue, CacheableBitmap newValue) { protected void entryRemoved(boolean evicted, String key, CacheableBitmap oldValue, CacheableBitmap newValue) {
if (evicted) { if (evicted) {
mCachedBitmaps.remove(oldValue.getReference()); mCachedBitmaps.remove(oldValue.getReference());
if (oldValue.get() != null && !TextUtils.equals(key, CONE_KEY) && !TextUtils.equals(key, CONE_O_KEY)) if (mReusableBitmaps != null && oldValue.get() != null && !TextUtils.equals(key, CONE_KEY) && !TextUtils.equals(key, CONE_O_KEY))
addReusableBitmapRef(oldValue.getReference()); addReusableBitmapRef(oldValue.getReference());
} }
} }
...@@ -152,7 +152,7 @@ public class BitmapCache { ...@@ -152,7 +152,7 @@ public class BitmapCache {
return bitmap; return bitmap;
} }
public synchronized void addReusableBitmapRef(SoftReference<Bitmap> ref){ private synchronized void addReusableBitmapRef(SoftReference<Bitmap> ref){
mReusableBitmaps.add(ref); mReusableBitmaps.add(ref);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment