/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/ |
D | ThumbnailCacheTest.java | 59 private ThumbnailCache mCache; field in ThumbnailCacheTest 63 mCache = new ThumbnailCache(CACHE_SIZE_LIMIT); in setUp() 68 mCache.putThumbnail(URI_0, MID_SIZE, MIDSIZE_BITMAP, LAST_MODIFIED); in testMiss() 70 Result result = mCache.getThumbnail(URI_1, MID_SIZE); in testMiss() 77 mCache.putThumbnail(URI_0, MID_SIZE, MIDSIZE_BITMAP, LAST_MODIFIED); in testHit_Exact() 79 Result result = mCache.getThumbnail(URI_0, MID_SIZE); in testHit_Exact() 87 mCache.putThumbnail(URI_0, MID_SIZE, MIDSIZE_BITMAP, LAST_MODIFIED); in testHit_Smaller() 89 Result result = mCache.getThumbnail(URI_0, LARGE_SIZE); in testHit_Smaller() 97 mCache.putThumbnail(URI_0, MID_SIZE, MIDSIZE_BITMAP, LAST_MODIFIED); in testHit_Larger() 99 Result result = mCache.getThumbnail(URI_0, SMALL_SIZE); in testHit_Larger() [all …]
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ |
D | FastScrollingIndexCacheTest.java | 31 private FastScrollingIndexCache mCache; field in FastScrollingIndexCacheTest 55 mCache = FastScrollingIndexCache.getInstanceForTest(mPrefs); in setUp() 92 assertNull(mCache.get(null, null, null, null, null)); in testPutAndGet() 93 assertNull(mCache.get(URI_A, "*s*", PROJECTION_0, "*so*", "*ce*")); in testPutAndGet() 94 assertNull(mCache.get(URI_A, "*s*", PROJECTION_1, "*so*", "*ce*")); in testPutAndGet() 95 assertNull(mCache.get(URI_B, "s", PROJECTION_2, "so", "ce")); in testPutAndGet() 99 b = putAndGetBundle(mCache, null, null, null, null, null, TITLES_0, COUNTS_0); in testPutAndGet() 102 b = putAndGetBundle(mCache, URI_A, "*s*", PROJECTION_0, "*so*", "*ce*", TITLES_1, COUNTS_1); in testPutAndGet() 105 b = putAndGetBundle(mCache, URI_A, "*s*", PROJECTION_1, "*so*", "*ce*", TITLES_2, COUNTS_2); in testPutAndGet() 108 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 | 42 private PreferenceListCache mCache; field in PreferenceListCacheTest 55 mCache = new PreferenceListCache(mGroup); in testEmptyPreferenceGroup() 56 mCache.removeCachedPrefs(); in testEmptyPreferenceGroup() 69 mCache = new PreferenceListCache(mGroup); in testCacheAndRestoreAllPreferences() 70 assertEquals(first, mCache.getCachedPreference("first")); in testCacheAndRestoreAllPreferences() 71 assertEquals(second, mCache.getCachedPreference("second")); in testCacheAndRestoreAllPreferences() 72 assertEquals(third, mCache.getCachedPreference("third")); in testCacheAndRestoreAllPreferences() 74 mCache.removeCachedPrefs(); in testCacheAndRestoreAllPreferences() 86 mCache = new PreferenceListCache(mGroup); in testRestoreSomePreferences() 87 assertEquals(first, mCache.getCachedPreference("first")); in testRestoreSomePreferences() [all …]
|
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/util/ |
D | CachedEventDispatcher.java | 33 private ArrayList<MotionEvent> mCache; field in CachedEventDispatcher 42 if (mCache == null) { in dispatchEvent() 43 mCache = new ArrayList<>(); in dispatchEvent() 46 mCache.add(mLastEvent); in dispatchEvent() 56 int cacheCount = mCache == null ? 0 : mCache.size(); in setConsumer() 58 MotionEvent ev = mCache.get(i); in setConsumer() 62 mCache = null; in setConsumer()
|
/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/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/DocumentsUI/src/com/android/documentsui/ |
D | ThumbnailCache.java | 51 private final Cache mCache; field in ThumbnailCache 60 mCache = new Cache(maxCacheSizeInBytes); in ThumbnailCache() 81 Entry entry = mCache.get(cacheKey); in getThumbnail() 93 Entry entry = mCache.get(cacheKey); in getThumbnail() 106 Entry entry = mCache.get(cacheKey); in getThumbnail() 137 mCache.put(cacheKey, entry); in putThumbnail() 158 mCache.remove(index); in removeUri() 177 mCache.evictAll(); in onTrimMemory() 179 mCache.trimToSize(mCache.size() / 2); in onTrimMemory()
|
/packages/apps/Launcher3/iconloaderlib/src/com/android/launcher3/icons/cache/ |
D | BaseIconCache.java | 82 private final Map<ComponentKey, CacheEntry> mCache; field in BaseIconCache 102 mCache = new HashMap<>(INITIAL_ICON_CACHE_CAPACITY); in BaseIconCache() 105 mCache = new AbstractMap<ComponentKey, CacheEntry>() { in BaseIconCache() 156 mCache.clear(); in updateIconParamsBg() 193 mCache.remove(new ComponentKey(componentName, user)); in remove() 201 for (ComponentKey key: mCache.keySet()) { in removeFromMemCacheLocked() 208 mCache.remove(condemned); in removeFromMemCacheLocked() 257 entry = mCache.get(key); in addIconToDBAndMemCache() 269 mCache.put(key, entry); in addIconToDBAndMemCache() 318 CacheEntry entry = mCache.get(cacheKey); in cacheLocked() [all …]
|
/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()
|
/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/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/Car/Radio/src/com/android/car/radio/platform/ |
D | ImageMemoryCache.java | 32 private final Map<Long, Bitmap> mCache; field in ImageMemoryCache 36 mCache = new CacheMap<>(cacheSize); in ImageMemoryCache() 40 synchronized (mCache) { in resolve() 41 if (mCache.containsKey(globalId)) return mCache.get(globalId); in resolve() 44 mCache.put(globalId, bm); in resolve()
|
/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/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/Launcher3/quickstep/src/com/android/quickstep/ |
D | TaskThumbnailCache.java | 42 private final ThumbnailCache mCache; field in TaskThumbnailCache 102 mCache = new ThumbnailCache(mCacheSize); in TaskThumbnailCache() 122 mCache.updateIfAlreadyInCache(taskId, thumbnail); in updateTaskSnapShot() 154 ThumbnailData cachedThumbnail = mCache.getAndInvalidateIfModified(key); in updateThumbnailInBackground() 172 mCache.put(key, thumbnail); in updateThumbnailInBackground() 186 mCache.evictAll(); in clear() 193 mCache.remove(key); in remove()
|
/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/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/Launcher3/src/com/android/launcher3/util/ |
D | ViewCache.java | 29 protected final SparseArray<CacheEntry> mCache = new SparseArray(); field in ViewCache 32 mCache.put(layoutId, new CacheEntry(size)); in setCacheSize() 36 CacheEntry entry = mCache.get(layoutId); in getView() 39 mCache.put(layoutId, entry); in getView() 53 CacheEntry entry = mCache.get(layoutId); in recycleView()
|
/packages/services/BuiltInPrintService/src/com/android/bips/ipp/ |
D | CapabilitiesCache.java | 67 private final LruCache<Uri, LocalPrinterCapabilities> mCache = new LruCache<>(CACHE_SIZE); field in CapabilitiesCache 98 mCache.remove(uri); in CapabilitiesCache() 110 mCache.remove(uri); in CapabilitiesCache() 175 LocalPrinterCapabilities capabilities = mCache.get(printer.path); in get() 188 return mCache.remove(printerUri); in remove() 296 mCache.remove(printer.getUri()); in accept() 300 mCache.put(printer.path, capabilities); in accept()
|
/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/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/ |
D | ComponentKeyMapper.java | 33 private final DynamicItemCache mCache; field in ComponentKeyMapper 38 mCache = cache; in ComponentKeyMapper() 63 return mCache.getInstantApp(componentKey.componentName.getPackageName()); in getApp() 65 return mCache.getShortcutInfo((ShortcutKey) componentKey); in getApp()
|
/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/Launcher3/src/com/android/launcher3/touch/ |
D | TouchEventTranslator.java | 54 private final SparseArray<Pair<PointerProperties[], PointerCoords[]>> mCache; field in TouchEventTranslator 59 mCache = new SparseArray<>(); in TouchEventTranslator() 142 if (mCache.get(n) == null) { in put() 149 mCache.put(n, new Pair(properties, coords)); in put() 259 Pair<PointerProperties[], PointerCoords[]> result = mCache.get(nFingers); in getFingerState() 281 return mCache.get(nFingers); in getFingerState()
|
/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()
|