Searched refs:cache (Results 1 - 25 of 63) sorted by relevance

123

/packages/apps/Gallery/tests/src/com/android/camera/gallery/
H A DLruCacheUnitTests.java9 LruCache<Integer, Integer> cache = new LruCache<Integer, Integer>(2);
12 cache.put(key, value);
13 assertEquals(value, cache.get(key));
17 LruCache<Integer, Integer> cache = new LruCache<Integer, Integer>(2);
20 cache.put(key, value);
22 cache.put(i + 10, i * i);
25 assertEquals(value, cache.get(key));
29 LruCache<Integer, Integer> cache = new LruCache<Integer, Integer>(2);
30 cache.put(0, new Integer(0));
32 cache
[all...]
/packages/apps/Gallery2/src/com/android/gallery3d/util/
H A DCacheManager.java31 private static final String KEY_CACHE_UP_TO_DATE = "cache-up-to-date";
46 BlobCache cache = sCacheMap.get(filename);
47 if (cache == null) {
51 cache = new BlobCache(path, maxEntries, maxBytes, false,
53 sCacheMap.put(filename, cache);
55 Log.e(TAG, "Cannot instantiate cache!", e);
58 return cache;
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/pipeline/
H A DBuffer.java24 import com.android.gallery3d.filtershow.cache.BitmapCache;
37 BitmapCache cache = MasterImage.getImage().getBitmapCache();
38 mBitmap = cache.getBitmapCopy(bitmap, BitmapCache.PREVIEW_CACHE);
91 BitmapCache cache = MasterImage.getImage().getBitmapCache();
92 if (cache.cache(mBitmap)) {
H A DCacheProcessing.java22 import com.android.gallery3d.filtershow.cache.BitmapCache;
37 Bitmap cache; field in class:CacheProcessing.CacheStep
122 environment.cache(source);
145 // New set of filters, let's clear the cache and rebuild it.
154 // First, let's find how similar we are in our cache
169 environment.cache(cacheStep.cache);
181 && mSteps.elementAt(findBaseImageIndex).cache == null) {
184 cacheBitmap = mSteps.elementAt(findBaseImageIndex).cache;
200 environment.cache(pre
[all...]
H A DFilterEnvironment.java24 import com.android.gallery3d.filtershow.cache.BitmapCache;
58 public void setBitmapCache(BitmapCache cache) { argument
59 mBitmapCache = cache;
62 public void cache(Buffer buffer) { method in class:FilterEnvironment
63 mBitmapCache.cache(buffer);
66 public void cache(Bitmap bitmap) { method in class:FilterEnvironment
67 mBitmapCache.cache(bitmap);
137 cache(bitmap);
/packages/apps/Email/tests/src/com/android/email/provider/
H A DContentCacheTests.java180 // The underlying cursor shouldn't be closed because it's in a cache (we'll test
208 // Create a cache of size 2
209 ContentCache cache = new ContentCache("Name", SIMPLE_PROJECTION, 2);
213 CacheToken token = cache.getCacheToken("1");
214 // Put the cursor in the cache
215 cache.putCursor(cursor1, "1", SIMPLE_PROJECTION, token);
216 assertEquals(1, cache.size());
221 token = cache.getCacheToken("2");
222 // Put the cursor in the cache
223 cache
[all...]
/packages/apps/Mms/src/com/android/mms/util/
H A DCacheManager.java32 private static final String KEY_CACHE_UP_TO_DATE = "cache-up-to-date";
49 BlobCache cache = sCacheMap.get(filename);
50 if (cache == null) {
56 cache = new BlobCache(path, maxEntries, maxBytes, false,
58 sCacheMap.put(filename, cache);
60 Log.e(TAG, "Cannot instantiate cache!", e);
63 return cache;
/packages/apps/Dialer/src/com/android/dialer/util/
H A DExpirableCache.java29 * An LRU cache in which all items can be marked as expired at a given time and it is possible to
35 * Consider a cache for contact information:
41 * the cache:
56 * and insert it back into the cache when the fetch completes.
58 * At a certain point we want to expire the content of the cache because we know the content may
68 * The values will be still available from the cache, but they will be expired.
75 * for evicting items when the cache is full. It is possible to supply your own subclass of LruCache
77 * Since the underlying cache maps keys to cached values it can determine which items are expired
89 * A cached value stored inside the cache.
91 * It provides access to the value stored in the cache bu
155 ExpirableCache(LruCache<K, CachedValue<V>> cache) argument
252 create(LruCache<K, CachedValue<V>> cache) argument
[all...]
/packages/apps/Email/src/com/android/email/provider/
H A DContentCache.java40 * An LRU cache for EmailContent (Account, HostAuth, Mailbox, and Message, thus far). The intended
41 * user of this cache is EmailProvider itself; caching is entirely transparent to users of the
47 * To create a cache:
48 * ContentCache cache = new ContentCache(name, projection, max);
50 * To (try to) get a cursor from a cache:
51 * Cursor cursor = cache.getCursor(id, projection);
53 * To read from a table and cache the resulting cursor:
54 * 1. Get a CacheToken: CacheToken token = cache.getToken(id);
56 * 3. Put the cursor in the cache: cache
293 CachedCursor(Cursor cursor, ContentCache cache, String id) argument
761 Statistics(ContentCache cache) argument
771 addCacheStatistics(ContentCache cache) argument
[all...]
/packages/apps/Contacts/src/com/android/contacts/
H A DSplitAggregateView.java240 SplitAggregateItemCache cache = (SplitAggregateItemCache)convertView.getTag();
241 if (cache == null) {
242 cache = new SplitAggregateItemCache();
243 cache.name = (TextView)convertView.findViewById(R.id.name);
244 cache.additionalData = (TextView)convertView.findViewById(R.id.additionalData);
245 cache.sourceIcon = (ImageView)convertView.findViewById(R.id.sourceIcon);
246 convertView.setTag(cache);
250 cache.name.setText(info.name);
251 cache.additionalData.setText(info.getAdditionalData());
259 cache
[all...]
/packages/apps/Gallery2/src/com/android/gallery3d/data/
H A DLocalMergeAlbum.java228 ArrayList<MediaItem> cache = null;
233 cache = mCacheRef.get();
234 if (cache == null) {
240 cache = mBaseSet.getMediaItem(index, PAGE_SIZE);
241 mCacheRef = new SoftReference<ArrayList<MediaItem>>(cache);
245 if (index < mStartPos || index >= mStartPos + cache.size()) {
249 return cache.get(index - mStartPos);
H A DMediaObject.java57 // These are flags for cache() and return values for getCacheFlag():
144 public void cache(int flag) { method in class:MediaObject
/packages/apps/Launcher3/src/com/android/launcher3/compat/
H A DAppWidgetManagerCompatV16.java82 public Drawable loadIcon(AppWidgetProviderInfo info, IconCache cache) { argument
83 return cache.getFullResIcon(info.provider.getPackageName(), info.icon);
H A DAppWidgetManagerCompat.java78 public abstract Drawable loadIcon(AppWidgetProviderInfo info, IconCache cache); argument
H A DAppWidgetManagerCompatVL.java102 public Drawable loadIcon(AppWidgetProviderInfo info, IconCache cache) { argument
103 return info.loadIcon(mContext, cache.getFullResIconDpi());
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/cache/
H A DBitmapCache.java17 package com.android.gallery3d.filtershow.cache;
117 public void setCacheProcessing(CacheProcessing cache) { argument
118 mCacheProcessing = cache;
121 public void cache(Buffer buffer) { method in class:BitmapCache
126 cache(bitmap);
129 public synchronized boolean cache(Bitmap bitmap) { method in class:BitmapCache
134 Log.e(LOGTAG, "Trying to cache a bitmap still used in the pipeline");
141 Log.e(LOGTAG, "Trying to cache a non mutable bitmap");
167 return true; // bitmap already in the cache
/packages/apps/UnifiedEmail/src/com/android/mail/adapter/
H A DDrawerItem.java138 Account account, int resource, boolean isCurrentAccount, BitmapCache cache,
149 mImagesCache = cache;
188 int unreadCount, boolean isCurrentAccount, BitmapCache cache,
191 isCurrentAccount, cache, contactResolver);
137 DrawerItem(int type, ControllableActivity activity, Folder folder, int folderType, Account account, int resource, boolean isCurrentAccount, BitmapCache cache, ContactResolver contactResolver) argument
187 ofAccount(ControllableActivity activity, Account account, int unreadCount, boolean isCurrentAccount, BitmapCache cache, ContactResolver contactResolver) argument
/packages/apps/UnifiedEmail/src/com/android/mail/bitmap/
H A DContactResolver.java73 public ContactResolver(final ContentResolver resolver, final BitmapCache cache) { argument
75 mCache = cache;
162 final ContentResolver resolver, final BitmapCache cache,
166 mCache = cache;
251 // DecodeTask does not add null results to the cache.
161 ContactResolverTask(final Set<ContactRequestHolder> contactRequests, final ContentResolver resolver, final BitmapCache cache, final ContactResolver callback) argument
/packages/apps/UnifiedEmail/src/com/android/mail/browse/
H A DConversationItemViewCoordinates.java274 final CoordinatesCache cache) {
283 ViewGroup view = (ViewGroup) cache.getView(layoutId);
286 cache.put(layoutId, view);
535 final Config config, final CoordinatesCache cache) {
537 ConversationItemViewCoordinates coordinates = cache.getCoordinates(cacheKey);
542 coordinates = new ConversationItemViewCoordinates(context, config, cache);
543 cache.put(cacheKey, coordinates);
273 ConversationItemViewCoordinates(final Context context, final Config config, final CoordinatesCache cache) argument
534 forConfig(final Context context, final Config config, final CoordinatesCache cache) argument
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/imageshow/
H A DMasterImage.java31 import com.android.gallery3d.filtershow.cache.BitmapCache;
32 import com.android.gallery3d.filtershow.cache.ImageLoader;
407 mBitmapCache.cache(mPreviousImage);
528 mBitmapCache.cache(mPartialBitmap);
536 mBitmapCache.cache(mHighresBitmap);
694 mBitmapCache.cache(mGeometryOnlyBitmap);
699 mBitmapCache.cache(mFiltersOnlyBitmap);
706 mBitmapCache.cache(mPartialBitmap);
713 mBitmapCache.cache(mHighresBitmap);
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/filters/
H A DImageFilterTinyPlanet.java26 import com.android.gallery3d.filtershow.cache.BitmapCache;
27 import com.android.gallery3d.filtershow.cache.ImageLoader;
H A DImageFilterDownsample.java24 import com.android.gallery3d.filtershow.cache.ImageLoader;
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/
H A DEditorPlaceHolder.java7 import com.android.gallery3d.filtershow.cache.ImageLoader;
/packages/apps/Dialer/src/com/android/dialer/list/
H A DPhoneFavoriteListView.java294 final Bitmap cache = view.getDrawingCache();
297 if (cache != null) {
299 bitmap = cache.copy(Bitmap.Config.ARGB_8888, false);
301 Log.w(LOG_TAG, "Failed to copy bitmap from Drawing cache", e);
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/
H A DLetterTileProvider.java142 final Bitmap[] cache = (getDefault) ? mDefaultBitmapCache : mBitmapBackgroundCache;
144 Bitmap bitmap = cache[pos];
154 cache[pos] = bitmap;

Completed in 2378 milliseconds

123