React to LruCache.entryEvicted renamed to LruCache.entryRemoved

Change-Id: Iab20ce0386ee4dabc8490dbde5cd2208626c293c
http://b/3461302
This commit is contained in:
Jesse Wilson 2011-02-25 17:25:28 -08:00
parent b7fa0f5baf
commit 5d29dac806
1 changed files with 4 additions and 3 deletions

View File

@ -390,10 +390,11 @@ public final class ContentCache {
mName = name;
mLruCache = new LruCache<String, Cursor>(maxSize) {
@Override
protected void entryEvicted(String key, Cursor cursor) {
protected void entryRemoved(
boolean evicted, String key, Cursor oldValue, Cursor newValue) {
// Close this cursor if it's no longer being used
if (!sActiveCursors.contains(cursor)) {
cursor.close();
if (evicted && !sActiveCursors.contains(oldValue)) {
oldValue.close();
}
}
};