/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/ |
D | ThumbnailCacheTest.java | 58 private ThumbnailCache mCache; field in ThumbnailCacheTest 62 mCache = new ThumbnailCache(CACHE_SIZE_LIMIT); in setUp() 67 mCache.putThumbnail(URI_0, MID_SIZE, MIDSIZE_BITMAP, LAST_MODIFIED); in testMiss() 69 Result result = mCache.getThumbnail(URI_1, MID_SIZE); in testMiss() 76 mCache.putThumbnail(URI_0, MID_SIZE, MIDSIZE_BITMAP, LAST_MODIFIED); in testHit_Exact() 78 Result result = mCache.getThumbnail(URI_0, MID_SIZE); in testHit_Exact() 86 mCache.putThumbnail(URI_0, MID_SIZE, MIDSIZE_BITMAP, LAST_MODIFIED); in testHit_Smaller() 88 Result result = mCache.getThumbnail(URI_0, LARGE_SIZE); in testHit_Smaller() 96 mCache.putThumbnail(URI_0, MID_SIZE, MIDSIZE_BITMAP, LAST_MODIFIED); in testHit_Larger() 98 Result result = mCache.getThumbnail(URI_0, SMALL_SIZE); in testHit_Larger() [all …]
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ |
D | FastScrollingIndexCacheTest.java | 32 private FastScrollingIndexCache mCache; field in FastScrollingIndexCacheTest 56 mCache = FastScrollingIndexCache.getInstanceForTest(mPrefs); in setUp() 93 assertNull(mCache.get(null, null, null, null, null)); in testPutAndGet() 94 assertNull(mCache.get(URI_A, "*s*", PROJECTION_0, "*so*", "*ce*")); in testPutAndGet() 95 assertNull(mCache.get(URI_A, "*s*", PROJECTION_1, "*so*", "*ce*")); in testPutAndGet() 96 assertNull(mCache.get(URI_B, "s", PROJECTION_2, "so", "ce")); in testPutAndGet() 100 b = putAndGetBundle(mCache, null, null, null, null, null, TITLES_0, COUNTS_0); in testPutAndGet() 103 b = putAndGetBundle(mCache, URI_A, "*s*", PROJECTION_0, "*so*", "*ce*", TITLES_1, COUNTS_1); in testPutAndGet() 106 b = putAndGetBundle(mCache, URI_A, "*s*", PROJECTION_1, "*so*", "*ce*", TITLES_2, COUNTS_2); in testPutAndGet() 109 b = putAndGetBundle(mCache, URI_B, "s", PROJECTION_2, "so", "ce", TITLES_3, COUNTS_3); in testPutAndGet() [all …]
|
/packages/apps/StorageManager/robotests/src/com/android/storagemanager/utils/ |
D | PreferenceListCacheTest.java | 48 private PreferenceListCache mCache; field in PreferenceListCacheTest 61 mCache = new PreferenceListCache(mGroup); in testEmptyPreferenceGroup() 62 mCache.removeCachedPrefs(); in testEmptyPreferenceGroup() 75 mCache = new PreferenceListCache(mGroup); in testCacheAndRestoreAllPreferences() 76 assertEquals(first, mCache.getCachedPreference("first")); in testCacheAndRestoreAllPreferences() 77 assertEquals(second, mCache.getCachedPreference("second")); in testCacheAndRestoreAllPreferences() 78 assertEquals(third, mCache.getCachedPreference("third")); in testCacheAndRestoreAllPreferences() 80 mCache.removeCachedPrefs(); in testCacheAndRestoreAllPreferences() 92 mCache = new PreferenceListCache(mGroup); in testRestoreSomePreferences() 93 assertEquals(first, mCache.getCachedPreference("first")); in testRestoreSomePreferences() [all …]
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/ |
D | FastScrollingIndexCache.java | 87 private final Map<String, String> mCache = Maps.newHashMap(); field in FastScrollingIndexCache 206 synchronized (mCache) { in get() 210 final String value = mCache.get(key); in get() 221 mCache.remove(key); in get() 238 synchronized (mCache) { in put() 242 mCache.put(key, buildCacheValue( in put() 254 synchronized (mCache) { in invalidate() 256 mCache.clear(); in invalidate() 272 for (String key : mCache.keySet()) { in save() 278 appendIfNotNull(sb, mCache.get(key)); in save() [all …]
|
/packages/apps/DocumentsUI/src/com/android/documentsui/ |
D | ThumbnailCache.java | 50 private final Cache mCache; field in ThumbnailCache 59 mCache = new Cache(maxCacheSizeInBytes); in ThumbnailCache() 80 Entry entry = mCache.get(cacheKey); in getThumbnail() 92 Entry entry = mCache.get(cacheKey); in getThumbnail() 105 Entry entry = mCache.get(cacheKey); in getThumbnail() 136 mCache.put(cacheKey, entry); in putThumbnail() 157 mCache.remove(index); in removeUri() 176 mCache.evictAll(); in onTrimMemory() 178 mCache.trimToSize(mCache.size() / 2); in onTrimMemory()
|
/packages/apps/Launcher2/src/com/android/launcher2/ |
D | IconCache.java | 75 private final HashMap<CacheKey, CacheEntry> mCache = field in IconCache 164 synchronized (mCache) { in remove() 165 mCache.remove(new CacheKey(componentName, user)); in remove() 173 synchronized (mCache) { in flush() 174 mCache.clear(); in flush() 183 synchronized (mCache) { in getTitleAndIcon() 194 synchronized (mCache) { in getIcon() 212 synchronized (mCache) { in getIcon() 229 CacheEntry entry = mCache.get(cacheKey); in cacheLocked() 233 mCache.put(cacheKey, entry); in cacheLocked()
|
/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
D | ImageCacheService.java | 40 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/UnifiedEmail/src/com/android/mail/bitmap/ |
D | ContactResolver.java | 58 private final BitmapCache mCache; field in ContactResolver 79 mCache = cache; in ContactResolver() 112 return new ContactResolverTask(batch, mResolver, mCache, this); in getContactResolverTask() 116 return mCache; in getCache() 162 private final BitmapCache mCache; field in ContactResolver.ContactResolverTask 170 mCache = cache; in ContactResolverTask() 233 null, mCache).decode(); in doInBackground() 261 if (bitmap == null && mCache != null) { in onProgressUpdate() 263 mCache.put(request.contactRequest, null); in onProgressUpdate()
|
D | AbstractAvatarDrawable.java | 48 private BitmapCache mCache; field in AbstractAvatarDrawable 82 mCache = cache; in setBitmapCache() 192 if (mCache != null) { in setImage() 193 cached = mCache.get(contactRequest, true /* incrementRefCount */); in setImage()
|
/packages/apps/Email/provider_src/com/android/email/provider/ |
D | ContentCache.java | 285 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/StorageManager/src/com/android/storagemanager/utils/ |
D | PreferenceListCache.java | 30 private ArrayMap<String, Preference> mCache; field in PreferenceListCache 38 mCache = new ArrayMap<>(); in PreferenceListCache() 43 if (TextUtils.isEmpty(key) || mCache.containsKey(key)) { in PreferenceListCache() 47 mCache.put(p.getKey(), p); in PreferenceListCache() 57 return mCache.remove(key); in getCachedPreference() 64 for (Preference p : mCache.values()) { in removeCachedPrefs()
|
/packages/apps/Gallery/src/com/android/camera/ |
D | ViewImage.java | 131 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 …]
|
D | GridViewSpecial.java | 721 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/UnifiedEmail/src/com/android/mail/content/ |
D | ObjectCursor.java | 31 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/Dialer/java/com/android/dialer/app/contactinfo/ |
D | ContactInfoCache.java | 54 private final ExpirableCache<NumberWithCountryIso, ContactInfo> mCache; field in ContactInfoCache 93 mCache = internalCache; in ContactInfoCache() 110 ExpirableCache.CachedValue<ContactInfo> cachedInfo = mCache.getCachedValue(numberCountryIso); in getValue() 117 mCache.put(numberCountryIso, ContactInfo.EMPTY); in getValue() 198 ContactInfo existingInfo = mCache.getPossiblyExpired(numberCountryIso); in queryContactInfo() 213 mCache.put(numberCountryIso, info); in queryContactInfo() 267 mCache.expireAll(); in invalidate() 327 mCache.put(numberCountryIso, contactInfo); in injectContactInfoForTest()
|
/packages/apps/Gallery/src/com/android/camera/gallery/ |
D | BaseImageList.java | 37 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/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/ |
D | UniqueKeysCache.java | 48 private final HashMap<Key, Key> mCache; field in UniqueKeysCache.UniqueKeysCacheImpl 53 mCache = new HashMap<>(); in UniqueKeysCacheImpl() 63 mCache.clear(); in clear() 71 final Key existingKey = mCache.get(key); in getUniqueKey() 77 mCache.put(key, key); in getUniqueKey()
|
/packages/apps/Email/provider_src/com/android/email/mail/internet/ |
D | AuthenticationCache.java | 26 private final Map<Long, CacheEntry> mCache; field in AuthenticationCache 56 mCache = new HashMap<Long, CacheEntry>(); in AuthenticationCache() 68 synchronized (mCache) { in retrieveAccessToken() 95 entry = mCache.get(account.mId); in getEntry() 102 mCache.put(account.mId, entry); in getEntry() 160 mCache.remove(entry.mAccountId); in clearEntry()
|
/packages/apps/Launcher3/src/com/android/launcher3/ |
D | IconCache.java | 96 private final HashMap<ComponentKey, CacheEntry> mCache = field in IconCache 191 mCache.remove(new ComponentKey(componentName, user)); in remove() 199 for (ComponentKey key: mCache.keySet()) { in removeFromMemCacheLocked() 206 mCache.remove(condemned); in removeFromMemCacheLocked() 360 entry = mCache.get(key); in addIconToDBAndMemCache() 373 mCache.put(key, entry); in addIconToDBAndMemCache() 511 CacheEntry entry = mCache.get(cacheKey); in cacheLocked() 514 mCache.put(cacheKey, entry); in cacheLocked() 576 CacheEntry entry = mCache.get(cacheKey); in cachePackageInstallInfo() 589 mCache.put(cacheKey, entry); in cachePackageInstallInfo() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/gadget/ |
D | MediaSetSource.java | 130 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/Calendar/src/com/android/calendar/selectcalendars/ |
D | CalendarColorCache.java | 34 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()
|
/packages/apps/Dialer/java/com/android/dialer/util/ |
D | ExpirableCache.java | 103 private LruCache<K, CachedValue<V>> mCache; field in ExpirableCache 106 mCache = cache; in ExpirableCache() 150 return mCache.get(key); in getCachedValue() 193 mCache.put(key, newCachedValue(value)); in put()
|
/packages/apps/Contacts/src/com/android/contacts/quickcontact/ |
D | ResolveCache.java | 112 private HashMap<String, Entry> mCache = new HashMap<String, Entry>(); field in ResolveCache 125 Entry entry = mCache.get(mimeType); in getEntry() 155 mCache.put(mimeType, entry); in getEntry() 214 mCache.clear(); in clear()
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/action/ |
D | SyncMessageBatch.java | 58 private final ThreadInfoCache mCache; field in SyncMessageBatch 74 mCache = cache; in SyncMessageBatch() 150 final String conversationId = mCache.getOrCreateConversation(db, sms.mThreadId, sms.mSubId, in storeSms() 245 final String conversationId = mCache.getOrCreateConversation(db, mms.mThreadId, mms.mSubId, in storeMms() 345 final boolean archived = mCache.isArchived(conversationId); in updateConversations()
|
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ |
D | AttachmentLoader.java | 46 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()
|