diff options
Diffstat (limited to 'core/java/android/util/LruCache.java')
-rw-r--r-- | core/java/android/util/LruCache.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/java/android/util/LruCache.java b/core/java/android/util/LruCache.java index 51e373c..dd504c1 100644 --- a/core/java/android/util/LruCache.java +++ b/core/java/android/util/LruCache.java @@ -186,10 +186,13 @@ public class LruCache<K, V> { } /** + * Remove the eldest entries until the total of remaining entries is at or + * below the requested size. + * * @param maxSize the maximum size of the cache before returning. May be -1 - * to evict even 0-sized elements. + * to evict even 0-sized elements. */ - private void trimToSize(int maxSize) { + public void trimToSize(int maxSize) { while (true) { K key; V value; |