Home
last modified time | relevance | path

Searched refs:mCache (Results 1 – 25 of 27) sorted by relevance

12

/packages/apps/Dialer/tests/src/com/android/dialer/util/
DExpirableCacheTest.java31 private ExpirableCache<String, Integer> mCache; field in ExpirableCacheTest
38 mCache = ExpirableCache.create(lruCache); in setUp()
43 mCache = null; in tearDown()
48 mCache.put("a", 1); in testPut()
49 mCache.put("b", 2); in testPut()
50 assertEquals(1, mCache.getPossiblyExpired("a").intValue()); in testPut()
51 assertEquals(2, mCache.getPossiblyExpired("b").intValue()); in testPut()
52 mCache.put("a", 3); in testPut()
53 assertEquals(3, mCache.getPossiblyExpired("a").intValue()); in testPut()
57 assertNull(mCache.getPossiblyExpired("a")); in testGet_NotExisting()
[all …]
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
DFastScrollingIndexCacheTest.java33 private FastScrollingIndexCache mCache; field in FastScrollingIndexCacheTest
57 mCache = FastScrollingIndexCache.getInstanceForTest(mPrefs); in setUp()
94 assertNull(mCache.get(null, null, null, null, null)); in testPutAndGet()
95 assertNull(mCache.get(URI_A, "*s*", PROJECTION_0, "*so*", "*ce*")); in testPutAndGet()
96 assertNull(mCache.get(URI_A, "*s*", PROJECTION_1, "*so*", "*ce*")); in testPutAndGet()
97 assertNull(mCache.get(URI_B, "s", PROJECTION_2, "so", "ce")); in testPutAndGet()
101 b = putAndGetBundle(mCache, null, null, null, null, null, TITLES_0, COUNTS_0); in testPutAndGet()
104 b = putAndGetBundle(mCache, URI_A, "*s*", PROJECTION_0, "*so*", "*ce*", TITLES_1, COUNTS_1); in testPutAndGet()
107 b = putAndGetBundle(mCache, URI_A, "*s*", PROJECTION_1, "*so*", "*ce*", TITLES_2, COUNTS_2); in testPutAndGet()
110 b = putAndGetBundle(mCache, URI_B, "s", PROJECTION_2, "so", "ce", TITLES_3, COUNTS_3); in testPutAndGet()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/
DIconCache.java67 private final HashMap<ComponentName, CacheEntry> mCache = field in IconCache
153 synchronized (mCache) { in remove()
154 mCache.remove(componentName); in remove()
163 for (ComponentName componentName: mCache.keySet()) { in remove()
177 synchronized (mCache) { in flush()
178 mCache.clear(); in flush()
186 synchronized (mCache) { in flushInvalidIcons()
187 Iterator<Entry<ComponentName, CacheEntry>> it = mCache.entrySet().iterator(); in flushInvalidIcons()
202 synchronized (mCache) { in getTitleAndIcon()
215 synchronized (mCache) { in getIcon()
[all …]
/packages/apps/Launcher2/src/com/android/launcher2/
DIconCache.java50 private final HashMap<ComponentName, CacheEntry> mCache = field in IconCache
135 synchronized (mCache) { in remove()
136 mCache.remove(componentName); in remove()
144 synchronized (mCache) { in flush()
145 mCache.clear(); in flush()
154 synchronized (mCache) { in getTitleAndIcon()
163 synchronized (mCache) { in getIcon()
178 synchronized (mCache) { in getIcon()
194 CacheEntry entry = mCache.get(componentName); in cacheLocked()
198 mCache.put(componentName, entry); in cacheLocked()
[all …]
/packages/apps/UnifiedEmail/src/com/android/bitmap/
DAltPooledCache.java44 private final LinkedHashMap<K, V> mCache; field in AltPooledCache
57 mCache = new LinkedHashMap<K, V>(0, 0.75f, true); in AltPooledCache()
70 synchronized (mCache) { in get()
71 V result = mCache.get(key); in get()
84 synchronized (mCache) { in put()
87 prev = mCache.put(key, value); in put()
112 synchronized (mCache) { in poll()
115 for (Map.Entry<K, V> entry : mCache.entrySet()) { in poll()
136 mCache.remove(eldestUnref.getKey()); in poll()
154 synchronized (mCache) { in toDebugString()
[all …]
DDecodeTask.java37 private final BitmapCache mCache; field in DecodeTask
84 mCache = cache; in DecodeTask()
105 mInBitmap = mCache.poll(); in doInBackground()
155 mCache.offer(mInBitmap); in doInBackground()
200 "decode thread wants a bitmap. cache dump:\n" + mCache.toDebugString()); in doInBackground()
254 mCache.offer(mInBitmap); in doInBackground()
321 mCache.put(mKey, result); in doInBackground()
327 mCache.offer(mInBitmap); in doInBackground()
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DFastScrollingIndexCache.java86 private final Map<String, String> mCache = Maps.newHashMap(); field in FastScrollingIndexCache
200 synchronized (mCache) { in get()
204 final String value = mCache.get(key); in get()
215 mCache.remove(key); in get()
232 synchronized (mCache) { in put()
236 mCache.put(key, buildCacheValue( in put()
248 synchronized (mCache) { in invalidate()
250 mCache.clear(); in invalidate()
266 for (String key : mCache.keySet()) { in save()
272 appendIfNotNull(sb, mCache.get(key)); in save()
[all …]
/packages/apps/Mms/src/com/android/mms/data/
DRecipientIdCache.java39 private final Map<Long, String> mCache; field in RecipientIdCache
63 mCache = new HashMap<Long, String>(); in RecipientIdCache()
84 sInstance.mCache.clear(); in fill()
89 sInstance.mCache.put(id, number); in fill()
116 String number = sInstance.mCache.get(longId); in getAddresses()
125 number = sInstance.mCache.get(longId); in getAddresses()
157 String number2 = sInstance.mCache.get(recipientId); in updateNumbers()
169 sInstance.mCache.put(recipientId, number1); in updateNumbers()
208 for (Long id : sInstance.mCache.keySet()) { in dump()
209 Log.d(TAG, id + ": " + sInstance.mCache.get(id)); in dump()
DConversation.java943 private final HashSet<Conversation> mCache; field in Conversation.Cache
945 mCache = new HashSet<Conversation>(10); in Cache()
957 for (Conversation c : sInstance.mCache) { in get()
979 for (Conversation c : sInstance.mCache) { in get()
1001 if (sInstance.mCache.contains(c)) { in put()
1008 sInstance.mCache.add(c); in put()
1027 if (!sInstance.mCache.contains(c)) { in replace()
1038 sInstance.mCache.remove(c); in replace()
1039 sInstance.mCache.add(c); in replace()
1050 for (Conversation c : sInstance.mCache) { in remove()
[all …]
/packages/apps/Gallery/src/com/android/camera/
DViewImage.java131 private BitmapCache mCache; field in ViewImage
447 mCache.clear(); // Because the position number is changed.
486 Bitmap b = mCache.getBitmap(pos); in setImage()
499 return !mCache.hasBitmap(pos + offset); in setImage()
532 mCache.put(pos + offset, bitmap.getBitmap()); in setImage()
571 mCache = new BitmapCache(3); in onCreate()
572 mImageView.setRecycler(mCache); in onCreate()
596 v.setRecycler(mCache); in onCreate()
976 mCache.clear(); in onStop()
1206 private final Entry[] mCache;
[all …]
DGridViewSpecial.java721 private final HashMap<Integer, ImageBlock> mCache; field in ImageBlockManager
761 mCache = new HashMap<Integer, ImageBlock>(); in ImageBlockManager()
796 ImageBlock blk = mCache.get(row); in clearLoaderQueue()
836 ImageBlock blk = mCache.get(row); in tryToLoad()
842 mCache.put(row, blk); in tryToLoad()
850 if (mCache.size() < CACHE_ROWS) { in getEmptyBlock()
856 for (int index : mCache.keySet()) { in getEmptyBlock()
859 if (mCache.get(index).hasPendingRequests()) { in getEmptyBlock()
876 return mCache.remove(bestIndex); in getEmptyBlock()
882 ImageBlock blk = mCache.get(row); in invalidateImage()
[all …]
/packages/apps/Email/src/com/android/email/provider/
DContentCache.java285 private final ContentCache mCache; field in ContentCache.CachedCursor
296 mCache = cache; in CachedCursor()
309 synchronized(mCache) { in close()
311 if ((count == 0) && mCache.mLruCache.get(mId) != (mCursor)) { in close()
734 private final ContentCache mCache; field in ContentCache.Statistics
762 mCache = cache; in Statistics()
763 mName = mCache.mName; in Statistics()
767 mCache = null; in Statistics()
799 append(sb, "Cursors", mCache == null ? mCursorCount : mCache.size()); in toString()
803 append(sb, "Tokens", mCache == null ? mTokenCount : mCache.mTokenList.size()); in toString()
/packages/apps/Gallery2/src/com/android/gallery3d/data/
DImageCacheService.java40 private BlobCache mCache; field in ImageCacheService
43 mCache = CacheManager.getCache(context, IMAGE_CACHE_FILE, in ImageCacheService()
65 synchronized (mCache) { in getImageData()
66 if (!mCache.lookup(request)) return false; in getImageData()
86 synchronized (mCache) { in putImageData()
88 mCache.insert(cacheKey, buffer.array()); in putImageData()
98 synchronized (mCache) { in clearImageData()
100 mCache.clearEntry(cacheKey); in clearImageData()
/packages/apps/Gallery/src/com/android/camera/gallery/
DBaseImageList.java37 private final LruCache<Integer, BaseImage> mCache = field in BaseImageList
63 mCache.clear(); in BaseImageList()
119 BaseImage result = mCache.get(i); in getImageAt()
127 mCache.put(i, result); in getImageAt()
163 mCache.clear(); in invalidateCache()
203 BaseImage image = mCache.get(i); in getImageForUri()
206 mCache.put(i, image); in getImageForUri()
/packages/apps/UnifiedEmail/src/com/android/mail/content/
DObjectCursor.java31 private final SparseArray<T> mCache; field in ObjectCursor
42 mCache = new SparseArray<T>(cursor.getCount()); in ObjectCursor()
44 mCache = null; in ObjectCursor()
63 final T prev = mCache.get(currentPosition); in getModel()
69 mCache.put(currentPosition, model); in getModel()
91 mCache.clear(); in close()
/packages/apps/Mms/src/com/android/mms/util/
DImageCacheService.java33 private BlobCache mCache; field in ImageCacheService
42 mCache = CacheManager.getCache(context, IMAGE_CACHE_FILE, in ImageCacheService()
62 synchronized (mCache) { in getImageData()
63 value = mCache.lookup(cacheKey); in getImageData()
82 synchronized (mCache) { in putImageData()
84 mCache.insert(cacheKey, buffer.array()); in putImageData()
/packages/apps/Gallery2/src/com/android/gallery3d/gadget/
DMediaSetSource.java130 private MediaItem mCache[] = new MediaItem[CACHE_SIZE]; field in MediaSetSource.CheckedMediaSetSource
155 items.toArray(mCache); in ensureCacheRange()
165 return mCache[index - mCacheStart].getContentUri(); in getContentUri()
172 return WidgetUtils.createWidgetBitmap(mCache[index - mCacheStart]); in getImage()
182 Arrays.fill(mCache, null); in reload()
/packages/apps/VideoEditor/src/com/android/videoeditor/widgets/
DMediaItemView.java637 private LruCache<ThumbnailKey, Bitmap> mCache; field in ThumbnailCache
640 mCache = new LruCache<ThumbnailKey, Bitmap>(size) { in ThumbnailCache()
649 mCache.put(key, value); in put()
653 return mCache.get(key); in get()
657 Map<ThumbnailKey, Bitmap> map = mCache.snapshot(); in clearForMediaItemId()
660 mCache.remove(key); in clearForMediaItemId()
/packages/apps/Calendar/src/com/android/calendar/selectcalendars/
DCalendarColorCache.java34 private HashSet<String> mCache = new HashSet<String>(); field in CalendarColorCache
85 mCache.add(generateKey(accountName, accountType)); in insert()
92 return mCache.contains(generateKey(accountName, accountType)); in hasColors()
99 mCache.clear(); in clear()
DSelectSyncedCalendarsMultiAccountAdapter.java139 private CalendarColorCache mCache; field in SelectSyncedCalendarsMultiAccountAdapter
224 mCache = new CalendarColorCache(context, this); in SelectSyncedCalendarsMultiAccountAdapter()
327 colorSquare.setEnabled(mCache.hasColors(accountName, accountType)); in bindChildView()
347 if (!mCache.hasColors(accountName, accountType)) { in bindChildView()
/packages/apps/Dialer/src/com/android/dialer/util/
DExpirableCache.java143 private LruCache<K, CachedValue<V>> mCache; field in ExpirableCache
156 mCache = cache; in ExpirableCache()
174 return mCache.get(key); in getCachedValue()
218 mCache.put(key, newCachedValue(value)); in put()
/packages/apps/Contacts/src/com/android/contacts/quickcontact/
DResolveCache.java111 private HashMap<String, Entry> mCache = new HashMap<String, Entry>(); field in ResolveCache
125 Entry entry = mCache.get(mimeType); in getEntry()
156 mCache.put(mimeType, entry); in getEntry()
233 mCache.clear(); in clear()
/packages/apps/UnifiedEmail/src/com/android/mail/bitmap/
DAttachmentDrawable.java49 private final BitmapCache mCache; field in AttachmentDrawable
94 mCache = cache; in AttachmentDrawable()
177 final ReusableBitmap cached = mCache.get(key, true /* incrementRefCount */); in setImage()
185 mCurrKey, mCache.toDebugString()); in setImage()
377 mTask = new DecodeTask(mCurrKey, w, bufferH, bufferW, bufferH, this, mCache); in decode()
DAttachmentGridDrawable.java24 private BitmapCache mCache; field in AttachmentGridDrawable
51 final AttachmentDrawable result = new AttachmentDrawable(mResources, mCache, in createDivisionDrawable()
57 mCache = cache; in setBitmapCache()
/packages/apps/UnifiedEmail/src/com/android/mail/browse/
DAttachmentLoader.java46 private Map<String, Attachment> mCache = Maps.newHashMap(); field in AttachmentLoader.AttachmentCursor
54 Attachment m = mCache.get(uri); in get()
57 mCache.put(uri, m); in get()

12