Home
last modified time | relevance | path

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

12

/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/
DThumbnailCacheTest.java59 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/
DFastScrollingIndexCacheTest.java31 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/
DPreferenceListCacheTest.java42 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/TV/common/tests/robotests/src/com/android/tv/common/
DTvContentRatingCacheTest.java53 final TvContentRatingCache mCache = TvContentRatingCache.getInstance(); field in TvContentRatingCacheTest
57 mCache.performTrimMemory(ComponentCallbacks2.TRIM_MEMORY_COMPLETE); in setUp()
62 mCache.performTrimMemory(ComponentCallbacks2.TRIM_MEMORY_COMPLETE); in tearDown()
68 mCache.getRatings(TvContentRatingConstants.STRING_US_TV_MA); in testGetRatings_US_TV_MA()
75 mCache.getRatings(TvContentRatingConstants.STRING_US_TV_MA); in testGetRatings_US_TV_MA_same()
77 mCache.getRatings(TvContentRatingConstants.STRING_US_TV_MA); in testGetRatings_US_TV_MA_same()
84 mCache.getRatings(TvContentRatingConstants.STRING_US_TV_MA); in testGetRatings_US_TV_MA_diffAfterClear()
85 mCache.performTrimMemory(ComponentCallbacks2.TRIM_MEMORY_COMPLETE); in testGetRatings_US_TV_MA_diffAfterClear()
87 mCache.getRatings(TvContentRatingConstants.STRING_US_TV_MA); in testGetRatings_US_TV_MA_diffAfterClear()
93 ImmutableList<TvContentRating> first = mCache.getRatings(MA_AND_Y7); in testGetRatings_TWO_orderDoesNotMatter()
[all …]
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/util/
DCachedEventDispatcher.java33 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/
DFastScrollingIndexCache.java87 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/
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/DocumentsUI/src/com/android/documentsui/
DThumbnailCache.java51 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/
DBaseIconCache.java84 private final Map<ComponentKey, CacheEntry> mCache; field in BaseIconCache
105 mCache = new HashMap<>(INITIAL_ICON_CACHE_CAPACITY); in BaseIconCache()
108 mCache = new AbstractMap<ComponentKey, CacheEntry>() { in BaseIconCache()
159 mCache.clear(); in updateIconParamsBg()
196 mCache.remove(new ComponentKey(componentName, user)); in remove()
204 for (ComponentKey key: mCache.keySet()) { in removeFromMemCacheLocked()
211 mCache.remove(condemned); in removeFromMemCacheLocked()
260 entry = mCache.get(key); in addIconToDBAndMemCache()
276 if (cachingLogic.addToMemCache()) mCache.put(key, entry); in addIconToDBAndMemCache()
317 CacheEntry entry = mCache.get(cacheKey); in cacheLocked()
[all …]
/packages/apps/StorageManager/src/com/android/storagemanager/utils/
DPreferenceListCache.java30 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/Car/Radio/src/com/android/car/radio/platform/
DImageMemoryCache.java32 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/
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/Launcher3/quickstep/src/com/android/quickstep/
DTaskThumbnailCache.java44 private final ThumbnailCache mCache; field in TaskThumbnailCache
103 mCache = new ThumbnailCache(mCacheSize); in TaskThumbnailCache()
123 mCache.updateIfAlreadyInCache(taskId, thumbnail); in updateTaskSnapShot()
155 ThumbnailData cachedThumbnail = mCache.getAndInvalidateIfModified(key); in updateThumbnailInBackground()
173 mCache.put(key, thumbnail); in updateThumbnailInBackground()
187 mCache.evictAll(); in clear()
194 mCache.remove(key); in remove()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/
DUniqueKeysCache.java48 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/
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/Launcher3/src/com/android/launcher3/util/
DViewCache.java29 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/
DCapabilitiesCache.java67 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/Launcher3/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/
DComponentKeyMapper.java33 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/
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/Contacts/src/com/android/contacts/quickcontact/
DResolveCache.java112 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/
DSyncMessageBatch.java58 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/Contacts/src/com/android/contacts/model/account/
DAccountTypeProvider.java57 private final ConcurrentMap<String, List<AccountType>> mCache = new ConcurrentHashMap<>(); field in AccountTypeProvider
95 List<AccountType> types = mCache.get(accountType); in getAccountTypes()
98 mCache.put(accountType, types); in getAccountTypes()
/packages/apps/Launcher3/robolectric_tests/src/com/android/launcher3/model/
DBaseModelUpdateTaskTestCase.java188 private final HashMap<ComponentKey, CacheEntry> mCache = new HashMap<>(); field in BaseModelUpdateTaskTestCase.MyIconCache
200 CacheEntry entry = mCache.get(new ComponentKey(componentName, user)); in cacheLocked()
213 mCache.put(new ComponentKey(key, Process.myUserHandle()), entry); in addCache()
/packages/modules/DnsResolver/
DDnsTlsSocket.h51 : mMark(mark), mServer(server), mObserver(observer), mCache(cache) {} in DnsTlsSocket()
133 DnsTlsSessionCache* _Nonnull const mCache; variable

12