/packages/apps/Dialer/tests/src/com/android/dialer/util/ |
D | ExpirableCacheTest.java | 31 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/ |
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/TV/usbtuner/src/com/android/usbtuner/exoplayer/cache/ |
D | RecordingSampleBuffer.java | 91 private SampleCache mCache = null; field in RecordingSampleBuffer.CachedSampleQueue 98 for (SampleCache cache = mCache; cache != null; cache = cache.getNext()) { in setSource() 102 mCache = newCache; in setSource() 103 for (SampleCache cache = mCache; cache != null; cache = cache.getNext()) { in setSource() 112 SampleHolder sample = mCache.maybeReadSample(); in maybeReadSample() 114 if (!mCache.canReadMore() && mCache.getNext() != null) { in maybeReadSample() 115 mCache.clear(); in maybeReadSample() 116 mCache.close(); in maybeReadSample() 117 mCache = mCache.getNext(); in maybeReadSample() 118 mCache.resetRead(); in maybeReadSample() [all …]
|
/packages/apps/TV/tests/unit/src/com/android/tv/common/ |
D | TvContentRatingCacheTest.java | 45 TvContentRatingCache mCache = TvContentRatingCache.getInstance(); field in TvContentRatingCacheTest 50 mCache.performTrimMemory(ComponentCallbacks2.TRIM_MEMORY_COMPLETE); in setUp() 55 mCache.performTrimMemory(ComponentCallbacks2.TRIM_MEMORY_COMPLETE); in tearDown() 60 TvContentRating[] result = mCache.getRatings(TvContentRatingConstants.STRING_US_TV_MA); in testGetRatings_US_TV_MA() 65 TvContentRating[] first = mCache.getRatings(TvContentRatingConstants.STRING_US_TV_MA); in testGetRatings_US_TV_MA_same() 66 TvContentRating[] second = mCache.getRatings(TvContentRatingConstants.STRING_US_TV_MA); in testGetRatings_US_TV_MA_same() 71 TvContentRating[] first = mCache.getRatings(TvContentRatingConstants.STRING_US_TV_MA); in testGetRatings_US_TV_MA_diffAfterClear() 72 mCache.performTrimMemory(ComponentCallbacks2.TRIM_MEMORY_COMPLETE); in testGetRatings_US_TV_MA_diffAfterClear() 73 TvContentRating[] second = mCache.getRatings(TvContentRatingConstants.STRING_US_TV_MA); in testGetRatings_US_TV_MA_diffAfterClear() 78 TvContentRating[] first = mCache.getRatings(MA_AND_Y7); in testGetRatings_TWO_orderDoesNotMatter() [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/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/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/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/Dialer/src/com/android/dialer/contactinfo/ |
D | ContactInfoCache.java | 132 private ExpirableCache<NumberWithCountryIso, ContactInfo> mCache; field in ContactInfoCache 144 mCache = ExpirableCache.create(CONTACT_INFO_CACHE_SIZE); in ContactInfoCache() 150 mCache.getCachedValue(numberCountryIso); in getValue() 153 mCache.put(numberCountryIso, ContactInfo.EMPTY); in getValue() 203 ContactInfo existingInfo = mCache.getPossiblyExpired(numberCountryIso); in queryContactInfo() 218 mCache.put(numberCountryIso, info); in queryContactInfo() 266 mCache.expireAll(); in invalidate() 331 mCache.put(numberCountryIso, contactInfo); in injectContactInfoForTest()
|
/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/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/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/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/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/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/Dialer/src/com/android/dialer/util/ |
D | ExpirableCache.java | 143 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/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/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()
|
/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/Launcher3/src/com/android/launcher3/ |
D | IconCache.java | 94 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() 375 entry = mCache.get(key); in updateCacheAndGetContentValues() 388 mCache.put(new ComponentKey(app.getComponentName(), app.getUser()), entry); in updateCacheAndGetContentValues() 538 CacheEntry entry = mCache.get(cacheKey); in cacheLocked() 541 mCache.put(cacheKey, entry); in cacheLocked() 585 CacheEntry entry = mCache.get(cacheKey); in cachePackageInstallInfo() 590 mCache.put(cacheKey, entry); in cachePackageInstallInfo() [all …]
|
/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/Launcher3/src/com/android/launcher3/compat/ |
D | PackageInstallerCompatVL.java | 41 private final IconCache mCache; field in PackageInstallerCompatVL 46 mCache = LauncherAppState.getInstance().getIconCache(); in PackageInstallerCompatVL() 69 mCache.cachePackageInstallInfo(packageName, user, info.getAppIcon(), in addSessionInfoToCahce()
|