Home
last modified time | relevance | path

Searched refs:cache (Results 1 – 25 of 118) sorted by relevance

12345

/packages/apps/TV/usbtuner/src/com/android/usbtuner/exoplayer/cache/
DRecordingSampleBuffer.java17 package com.android.usbtuner.exoplayer.cache;
98 for (SampleCache cache = mCache; cache != null; cache = cache.getNext()) { in setSource()
99 cache.clear(); in setSource()
100 cache.close(); in setSource()
103 for (SampleCache cache = mCache; cache != null; cache = cache.getNext()) { in setSource()
104 cache.resetRead(); in setSource()
142 for (SampleCache cache = mCache; cache != null; cache = cache.getNext()) { in clear()
143 cache.clear(); in clear()
144 cache.close(); in clear()
205 for (SampleCache cache : mSampleCaches) { in isLiveLocked()
[all …]
DCacheManager.java17 package com.android.usbtuner.exoplayer.cache;
72 public void onWrite(SampleCache cache) {
73 mCacheSize += cache.getSize();
77 public void onDelete(SampleCache cache) {
78 mPendingDelete.remove(cache);
79 mCacheSize -= cache.getSize();
91 void onWrite(SampleCache cache); in onWrite() argument
92 void onDelete(SampleCache cache); in onDelete() argument
267 public synchronized void add(SampleCache cache) { in add() argument
268 mCaches.add(cache); in add()
[all …]
/packages/apps/Email/tests/src/com/android/email/provider/
DContentCacheTests.java209 ContentCache cache = new ContentCache("Name", SIMPLE_PROJECTION, 2); in testContentCacheRemoveEldestEntry() local
213 CacheToken token = cache.getCacheToken("1"); in testContentCacheRemoveEldestEntry()
215 cache.putCursor(cursor1, "1", SIMPLE_PROJECTION, token); in testContentCacheRemoveEldestEntry()
216 assertEquals(1, cache.size()); in testContentCacheRemoveEldestEntry()
221 token = cache.getCacheToken("2"); in testContentCacheRemoveEldestEntry()
223 cache.putCursor(cursor1, "2", SIMPLE_PROJECTION, token); in testContentCacheRemoveEldestEntry()
224 assertEquals(2, cache.size()); in testContentCacheRemoveEldestEntry()
227 Cursor cachedCursor = cache.getCachedCursor("1", SIMPLE_PROJECTION); in testContentCacheRemoveEldestEntry()
230 cachedCursor = cache.getCachedCursor("2", SIMPLE_PROJECTION); in testContentCacheRemoveEldestEntry()
241 token = cache.getCacheToken("3"); in testContentCacheRemoveEldestEntry()
[all …]
/packages/apps/Gallery/tests/src/com/android/camera/gallery/
DLruCacheUnitTests.java9 LruCache<Integer, Integer> cache = new LruCache<Integer, Integer>(2); in testPut() local
12 cache.put(key, value); in testPut()
13 assertEquals(value, cache.get(key)); in testPut()
17 LruCache<Integer, Integer> cache = new LruCache<Integer, Integer>(2); in testTracingInUsedObject() local
20 cache.put(key, value); in testTracingInUsedObject()
22 cache.put(i + 10, i * i); in testTracingInUsedObject()
25 assertEquals(value, cache.get(key)); in testTracingInUsedObject()
29 LruCache<Integer, Integer> cache = new LruCache<Integer, Integer>(2); in testLruAlgorithm() local
30 cache.put(0, new Integer(0)); in testLruAlgorithm()
32 cache.put(i + 1, i * i); in testLruAlgorithm()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/pipeline/
DCacheProcessing.java22 import com.android.gallery3d.filtershow.cache.BitmapCache;
37 Bitmap cache; field in CacheProcessing.CacheStep
122 environment.cache(source); in apply()
169 environment.cache(cacheStep.cache); in process()
181 && mSteps.elementAt(findBaseImageIndex).cache == null) { in process()
184 cacheBitmap = mSteps.elementAt(findBaseImageIndex).cache; in process()
200 environment.cache(prev); in process()
224 if (step.cache == null) { in process()
231 step.cache = cacheBitmap; in process()
235 environment.cache(originalCopy); in process()
[all …]
DFilterEnvironment.java24 import com.android.gallery3d.filtershow.cache.BitmapCache;
58 public void setBitmapCache(BitmapCache cache) { in setBitmapCache() argument
59 mBitmapCache = cache; in setBitmapCache()
62 public void cache(Buffer buffer) { in cache() method in FilterEnvironment
63 mBitmapCache.cache(buffer); in cache()
66 public void cache(Bitmap bitmap) { in cache() method in FilterEnvironment
67 mBitmapCache.cache(bitmap); in cache()
137 cache(bitmap); in applyRepresentation()
DBuffer.java24 import com.android.gallery3d.filtershow.cache.BitmapCache;
37 BitmapCache cache = MasterImage.getImage().getBitmapCache(); in Buffer() local
38 mBitmap = cache.getBitmapCopy(bitmap, BitmapCache.PREVIEW_CACHE); in Buffer()
91 BitmapCache cache = MasterImage.getImage().getBitmapCache(); in remove() local
92 if (cache.cache(mBitmap)) { in remove()
DCachingPipeline.java31 import com.android.gallery3d.filtershow.cache.BitmapCache;
32 import com.android.gallery3d.filtershow.cache.ImageLoader;
234 mEnvironment.cache(bmp); in renderHighres()
256 mEnvironment.cache(bitmap); in renderGeometry()
278 mEnvironment.cache(bitmap); in renderFilters()
424 mEnvironment.cache(result); in compute()
/packages/apps/Email/provider_src/com/android/email/provider/
DContentCache.java293 public CachedCursor(Cursor cursor, ContentCache cache, String id) { in CachedCursor() argument
296 mCache = cache; in CachedCursor()
720 for (ContentCache cache: sContentCaches) { in invalidateAllCaches()
721 cache.invalidate(); in invalidateAllCaches()
761 Statistics(ContentCache cache) { in Statistics() argument
762 mCache = cache; in Statistics()
771 private void addCacheStatistics(ContentCache cache) { in addCacheStatistics() argument
772 if (cache != null) { in addCacheStatistics()
773 mHitCount += cache.mStats.mHitCount; in addCacheStatistics()
774 mMissCount += cache.mStats.mMissCount; in addCacheStatistics()
[all …]
/packages/apps/Messaging/src/com/android/messaging/datamodel/media/
DMediaCacheManager.java50 MediaCache<?> cache = mCaches.get(id); in getOrCreateMediaCacheById() local
51 if (cache == null) { in getOrCreateMediaCacheById()
52 cache = createMediaCacheById(id); in getOrCreateMediaCacheById()
53 if (cache != null) { in getOrCreateMediaCacheById()
54 mCaches.put(id, cache); in getOrCreateMediaCacheById()
57 return cache; in getOrCreateMediaCacheById()
61 final MediaCache<?> cache = getOrCreateMediaCacheById(cacheId); in getOrCreateBitmapPoolForCache() local
62 if (cache != null && cache instanceof PoolableImageCache) { in getOrCreateBitmapPoolForCache()
63 return ((PoolableImageCache) cache).asReusableBitmapPool(); in getOrCreateBitmapPoolForCache()
/packages/apps/Contacts/src/com/android/contacts/
DSplitAggregateView.java240 SplitAggregateItemCache cache = (SplitAggregateItemCache)convertView.getTag(); in getView() local
241 if (cache == null) { in getView()
242 cache = new SplitAggregateItemCache(); in getView()
243 cache.name = (TextView)convertView.findViewById(R.id.name); in getView()
244 cache.additionalData = (TextView)convertView.findViewById(R.id.additionalData); in getView()
245 cache.sourceIcon = (ImageView)convertView.findViewById(R.id.sourceIcon); in getView()
246 convertView.setTag(cache); in getView()
250 cache.name.setText(info.name); in getView()
251 cache.additionalData.setText(info.getAdditionalData()); in getView()
259 cache.sourceIcon.setImageDrawable(icon); in getView()
[all …]
/packages/apps/ExactCalculator/src/com/android/calculator2/
DEvaluator.java554 int getLsdOffset(BoundedRational ratVal, String cache, int decIndex) { in getLsdOffset() argument
559 for (i = -1; decIndex + i > 0 && cache.charAt(decIndex + i) == '0'; --i) { } in getLsdOffset()
578 private int getPreferredPrec(String cache, int msd, int lastDigitOffset) { in getPreferredPrec() argument
580 final int wholeSize = cache.indexOf('.'); in getPreferredPrec()
581 final int negative = cache.charAt(0) == '-' ? 1 : 0; in getPreferredPrec()
629 private String getShortString(String cache, int msdIndex, int lsdOffset) { in getShortString() argument
635 final int dotIndex = cache.indexOf('.'); in getShortString()
636 final int negative = cache.charAt(0) == '-' ? 1 : 0; in getShortString()
640 if (msdIndex >= cache.length() - SHORT_TARGET_LENGTH) { in getShortString()
680 return negativeSign + cache.substring(msdIndex, lsdIndex + 1); in getShortString()
[all …]
/packages/apps/Messaging/src/com/android/messaging/datamodel/
DMemoryCacheManager.java45 public void registerMemoryCache(final MemoryCache cache) { in registerMemoryCache() argument
47 mMemoryCaches.add(cache); in registerMemoryCache()
54 public void unregisterMemoryCache(final MemoryCache cache) { in unregisterMemoryCache() argument
56 mMemoryCaches.remove(cache); in unregisterMemoryCache()
71 for (final MemoryCache cache : shallowCopy) { in reclaimMemory()
72 cache.reclaim(); in reclaimMemory()
/packages/apps/Messaging/src/com/android/messaging/datamodel/action/
DSyncMessagesAction.java226 final SyncManager.ThreadInfoCache cache = syncManager.getThreadInfoCache(); in doBackgroundWork() local
227 cache.clear(); in doBackgroundWork()
245 messagesToDelete, maxMessagesToScan, maxMessagesToUpdate, cache); in doBackgroundWork()
281 final int maxMessagesToUpdate, final ThreadInfoCache cache) { in syncCursorPair() argument
306 smsToAdd, mmsToAdd, messagesToDelete, cache); in syncCursorPair()
320 setMmsSenders(mmsToAdd, cache); in syncCursorPair()
579 final ThreadInfoCache cache) { in setMmsSenders() argument
588 senderId = getMmsSender(mms, cache); in setMmsSenders()
602 private String getMmsSender(final MmsMessage mms, final ThreadInfoCache cache) { in getMmsSender() argument
603 final List<String> recipients = cache.getThreadRecipients(mms.mThreadId); in getMmsSender()
/packages/apps/Launcher3/src/com/android/launcher3/
DHolographicOutlineHelper.java172 Bitmap cache = mBitmapCache.get(key); in createMediumDropShadow() local
173 if (cache == null) { in createMediumDropShadow()
174 cache = Bitmap.createBitmap(bitmapWidth, bitmapHeight, Bitmap.Config.ARGB_8888); in createMediumDropShadow()
175 mCanvas.setBitmap(cache); in createMediumDropShadow()
176 mBitmapCache.put(key, cache); in createMediumDropShadow()
178 mCanvas.setBitmap(cache); in createMediumDropShadow()
190 return cache.extractAlpha(mBlurPaint, null); in createMediumDropShadow()
/packages/apps/Gallery2/src/com/android/gallery3d/data/
DLocalMergeAlbum.java228 ArrayList<MediaItem> cache = null; in getItem() local
233 cache = mCacheRef.get(); in getItem()
234 if (cache == null) { in getItem()
240 cache = mBaseSet.getMediaItem(index, PAGE_SIZE); in getItem()
241 mCacheRef = new SoftReference<ArrayList<MediaItem>>(cache); in getItem()
245 if (index < mStartPos || index >= mStartPos + cache.size()) { in getItem()
249 return cache.get(index - mStartPos); in getItem()
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/
DCalendarProvider2Test.java1029 CalendarCache cache = new CalendarCache(helper); in initCalendarCacheLocked() local
1034 cache.writeDataLocked(db, CalendarCache.KEY_TIMEZONE_DATABASE_VERSION, "2010k"); in initCalendarCacheLocked()
1035cache.writeDataLocked(db, CalendarCache.KEY_TIMEZONE_TYPE, CalendarCache.TIMEZONE_TYPE_AUTO); in initCalendarCacheLocked()
1036 cache.writeDataLocked(db, CalendarCache.KEY_TIMEZONE_INSTANCES, localTimezone); in initCalendarCacheLocked()
1037 cache.writeDataLocked(db, CalendarCache.KEY_TIMEZONE_INSTANCES_PREVIOUS, localTimezone); in initCalendarCacheLocked()
2807 CalendarCache cache = new CalendarCache(helper); in testGetAndSetTimezoneDatabaseVersion() local
2811 String value = cache.readData(null); in testGetAndSetTimezoneDatabaseVersion()
2817 assertNull(cache.readTimezoneDatabaseVersion()); in testGetAndSetTimezoneDatabaseVersion()
2819 cache.writeTimezoneDatabaseVersion("1234"); in testGetAndSetTimezoneDatabaseVersion()
2820 assertEquals("1234", cache.readTimezoneDatabaseVersion()); in testGetAndSetTimezoneDatabaseVersion()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/imageshow/
DMasterImage.java31 import com.android.gallery3d.filtershow.cache.BitmapCache;
32 import com.android.gallery3d.filtershow.cache.ImageLoader;
407 mBitmapCache.cache(mPreviousImage); in resetAnimBitmap()
528 mBitmapCache.cache(mPartialBitmap); in invalidatePartialPreview()
536 mBitmapCache.cache(mHighresBitmap); in invalidateHighresPreview()
694 mBitmapCache.cache(mGeometryOnlyBitmap); in available()
699 mBitmapCache.cache(mFiltersOnlyBitmap); in available()
706 mBitmapCache.cache(mPartialBitmap); in available()
713 mBitmapCache.cache(mHighresBitmap); in available()
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/cache/
DBitmapCache.java17 package com.android.gallery3d.filtershow.cache;
117 public void setCacheProcessing(CacheProcessing cache) { in setCacheProcessing() argument
118 mCacheProcessing = cache; in setCacheProcessing()
121 public void cache(Buffer buffer) { in cache() method in BitmapCache
126 cache(bitmap); in cache()
129 public synchronized boolean cache(Bitmap bitmap) { in cache() method in BitmapCache
DImageLoader.java17 package com.android.gallery3d.filtershow.cache;
254 public static Bitmap loadRegionBitmap(Context context, BitmapCache cache, in loadRegionBitmap() argument
276 Bitmap reuse = cache.getBitmap(imageBounds.width(), in loadRegionBitmap()
281 cache.cache(reuse); // not reused, put back in cache in loadRegionBitmap()
416 BitmapCache cache, in getScaleOneImageForPreset() argument
433 return loadRegionBitmap(context, cache, uri, options, bounds); in getScaleOneImageForPreset()
/packages/apps/Gallery2/src/com/android/gallery3d/util/
DCacheManager.java46 BlobCache cache = sCacheMap.get(filename); in getCache() local
47 if (cache == null) { in getCache()
51 cache = new BlobCache(path, maxEntries, maxBytes, false, in getCache()
53 sCacheMap.put(filename, cache); in getCache()
58 return cache; in getCache()
/packages/apps/UnifiedEmail/src/com/android/mail/browse/
DConversationItemViewCoordinates.java245 final CoordinatesCache cache) { in ConversationItemViewCoordinates() argument
251 ViewGroup view = (ViewGroup) cache.getView(layoutId); in ConversationItemViewCoordinates()
254 cache.put(layoutId, view); in ConversationItemViewCoordinates()
477 final Config config, final CoordinatesCache cache) { in forConfig() argument
479 ConversationItemViewCoordinates coordinates = cache.getCoordinates(cacheKey); in forConfig()
484 coordinates = new ConversationItemViewCoordinates(context, config, cache); in forConfig()
485 cache.put(cacheKey, coordinates); in forConfig()
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
DDictionaryFacilitatorLruCacheTests.java27 final DictionaryFacilitatorLruCache cache = in testGetFacilitator() local
30 final DictionaryFacilitator dictionaryFacilitatorEnUs = cache.get(Locale.US); in testGetFacilitator()
34 final DictionaryFacilitator dictionaryFacilitatorFr = cache.get(Locale.FRENCH); in testGetFacilitator()
38 final DictionaryFacilitator dictionaryFacilitatorDe = cache.get(Locale.GERMANY); in testGetFacilitator()
/packages/apps/Dialer/src/com/android/dialer/util/
DExpirableCache.java155 private ExpirableCache(LruCache<K, CachedValue<V>> cache) { in ExpirableCache() argument
156 mCache = cache; in ExpirableCache()
252 public static <K, V> ExpirableCache<K, V> create(LruCache<K, CachedValue<V>> cache) { in create() argument
253 return new ExpirableCache<K, V>(cache); in create()
/packages/apps/UnifiedEmail/src/com/android/mail/bitmap/
DContactResolver.java77 public ContactResolver(final ContentResolver resolver, final BitmapCache cache) { in ContactResolver() argument
79 mCache = cache; in ContactResolver()
166 final ContentResolver resolver, final BitmapCache cache, in ContactResolverTask() argument
170 mCache = cache; in ContactResolverTask()

12345