Searched refs:cache (Results 1 - 25 of 54) 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);
H A DCachingPipeline.java31 import com.android.gallery3d.filtershow.cache.BitmapCache;
32 import com.android.gallery3d.filtershow.cache.ImageLoader;
234 mEnvironment.cache(bmp);
256 mEnvironment.cache(bitmap);
278 mEnvironment.cache(bitmap);
424 mEnvironment.cache(result);
/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.java30 private static final String KEY_CACHE_UP_TO_DATE = "cache-up-to-date";
47 BlobCache cache = sCacheMap.get(filename);
48 if (cache == null) {
54 cache = new BlobCache(path, maxEntries, maxBytes, false,
56 sCacheMap.put(filename, cache);
58 Log.e(TAG, "Cannot instantiate cache!", e);
61 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/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
H A DImageLoader.java17 package com.android.gallery3d.filtershow.cache;
254 public static Bitmap loadRegionBitmap(Context context, BitmapCache cache, argument
276 Bitmap reuse = cache.getBitmap(imageBounds.width(),
281 cache.cache(reuse); // not reused, put back in cache
416 BitmapCache cache,
433 return loadRegionBitmap(context, cache, uri, options, bounds);
415 getScaleOneImageForPreset(Context context, BitmapCache cache, Uri uri, Rect bounds, Rect destination) argument
/packages/apps/UnifiedEmail/src/com/android/mail/bitmap/
H A DAttachmentGridDrawable.java56 public void setBitmapCache(BitmapCache cache) { argument
57 mCache = cache;
/packages/services/Telephony/src/com/android/phone/
H A DCallerInfoCache.java113 if (DBG) log("Start refreshing cache.");
148 * When cache is being refreshed, this whole object will be replaced with a newer object,
162 CallerInfoCache cache = new CallerInfoCache(context);
163 // The first cache should be available ASAP.
164 cache.startAsyncCache();
165 cache.setRepeatingCacheUpdateAlarm();
166 return cache;
178 Log.w(LOG_TAG, "Previous cache task is remaining.");
186 * Set up periodic alarm for cache update.
206 // to block incoming calls asking for the cache
[all...]
/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/inputmethods/PinyinIME/jni/share/
H A Duserdict.cpp1364 UserDictCache *cache = &caches_[searchable->splids_len - 1];
1365 if (cache->head == cache->tail)
1369 uint16 i = cache->head;
1373 if (cache->signatures[i][j] != searchable->signature[j])
1380 if (i == cache->tail)
1384 *offset = cache->offsets[i];
1385 *length = cache->lengths[i];
1393 UserDictCache *cache = &caches_[searchable->splids_len - 1];
1394 uint16 next = cache
[all...]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/
H A DEditorPlaceHolder.java7 import com.android.gallery3d.filtershow.cache.ImageLoader;
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/
H A DLetterTileProvider.java170 final Bitmap[] cache = (getDefault) ? mDefaultBitmapCache : mBitmapBackgroundCache;
172 Bitmap bitmap = cache[pos];
182 cache[pos] = bitmap;
/packages/apps/UnifiedEmail/src/com/android/mail/browse/
H A DConversationItemViewCoordinates.java294 final CoordinatesCache cache) {
316 ViewGroup view = (ViewGroup) cache.getView(layoutId);
319 cache.put(layoutId, view);
663 final Config config, final CoordinatesCache cache) {
665 ConversationItemViewCoordinates coordinates = cache.getCoordinates(cacheKey);
670 coordinates = new ConversationItemViewCoordinates(context, config, cache);
671 cache.put(cacheKey, coordinates);
293 ConversationItemViewCoordinates(final Context context, final Config config, final CoordinatesCache cache) argument
662 forConfig(final Context context, final Config config, final CoordinatesCache cache) argument
/packages/apps/Dialer/src/com/android/dialer/list/
H A DPhoneFavoriteListView.java405 final Bitmap cache = view.getDrawingCache();
408 if (cache != null) {
410 bitmap = cache.copy(Bitmap.Config.ARGB_8888, false);
412 Log.w(LOG_TAG, "Failed to copy bitmap from Drawing cache", e);

Completed in 421 milliseconds

123