Use Map.Entry, not LinkedHashMap.Entry
Map.Entry is the defined return value from entrySet(). LinkedHashMap.Entry shouldn't be used directly. Change-Id: Ib23ceac365c85cdec6ab1688e8f8168ce882bc90
This commit is contained in:
@@ -41,6 +41,7 @@ import java.lang.ref.SoftReference;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
@@ -62,7 +63,7 @@ public class ImageDownloader {
|
||||
new LinkedHashMap<String, Bitmap>(HARD_CACHE_CAPACITY / 2, 0.75f, true) {
|
||||
private static final long serialVersionUID = -7190622541619388252L;
|
||||
@Override
|
||||
protected boolean removeEldestEntry(LinkedHashMap.Entry<String, Bitmap> eldest) {
|
||||
protected boolean removeEldestEntry(Map.Entry<String, Bitmap> eldest) {
|
||||
if (size() > HARD_CACHE_CAPACITY) {
|
||||
// Entries push-out of hard reference cache are transferred to soft reference cache
|
||||
sSoftBitmapCache.put(eldest.getKey(), new SoftReference<Bitmap>(eldest.getValue()));
|
||||
|
||||
Reference in New Issue
Block a user