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

1234

/packages/apps/Messaging/src/com/android/messaging/datamodel/media/
H A DMediaCacheManager.java50 MediaCache<?> cache = mCaches.get(id);
51 if (cache == null) {
52 cache = createMediaCacheById(id);
53 if (cache != null) {
54 mCaches.put(id, cache);
57 return cache;
61 final MediaCache<?> cache = getOrCreateMediaCacheById(cacheId);
62 if (cache != null && cache instanceof PoolableImageCache) {
63 return ((PoolableImageCache) cache)
[all...]
/packages/apps/Messaging/src/com/android/messaging/datamodel/
H A DMemoryCacheManager.java36 * Extend this interface to provide a reclaim method on a memory cache.
43 * Register the memory cache with the application.
45 public void registerMemoryCache(final MemoryCache cache) { argument
47 mMemoryCaches.add(cache);
52 * Unregister the memory cache with the application.
54 public void unregisterMemoryCache(final MemoryCache cache) { argument
56 mMemoryCaches.remove(cache);
65 // We're creating a cache copy in the lock to ensure we're not working on a concurrently
71 for (final MemoryCache cache : shallowCopy) {
72 cache
[all...]
/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/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
H A DDictionaryFacilitatorLruCacheTests.java27 final DictionaryFacilitatorLruCache cache =
30 final DictionaryFacilitator dictionaryFacilitatorEnUs = cache.get(Locale.US);
34 final DictionaryFacilitator dictionaryFacilitatorFr = cache.get(Locale.FRENCH);
38 final DictionaryFacilitator dictionaryFacilitatorDe = cache.get(Locale.GERMANY);
/packages/apps/Dialer/java/com/android/dialer/util/
H A DExpirableCache.java25 * An LRU cache in which all items can be marked as expired at a given time and it is possible to
31 * <p>Consider a cache for contact information:
40 * the cache:
59 * and insert it back into the cache when the fetch completes.
61 * <p>At a certain point we want to expire the content of the cache because we know the content may
73 * The values will be still available from the cache, but they will be expired.
80 * for evicting items when the cache is full. It is possible to supply your own subclass of LruCache
82 * the underlying cache maps keys to cached values it can determine which items are expired and
94 * The current generation of items added to the cache.
96 * <p>Items in the cache ca
103 private LruCache<K, CachedValue<V>> cache; field in class:ExpirableCache
105 ExpirableCache(LruCache<K, CachedValue<V>> cache) argument
121 create(LruCache<K, CachedValue<V>> cache) argument
[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/Settings/src/com/android/settings/wifi/
H A DLongPressAccessPointPreference.java31 UserBadgeCache cache, boolean forSavedNetworks, Fragment fragment) {
32 super(accessPoint, context, cache, forSavedNetworks);
37 UserBadgeCache cache, boolean forSavedNetworks, int iconResId, Fragment fragment) {
38 super(accessPoint, context, cache, iconResId, forSavedNetworks);
30 LongPressAccessPointPreference(AccessPoint accessPoint, Context context, UserBadgeCache cache, boolean forSavedNetworks, Fragment fragment) argument
36 LongPressAccessPointPreference(AccessPoint accessPoint, Context context, UserBadgeCache cache, boolean forSavedNetworks, int iconResId, Fragment fragment) argument
H A DConnectedAccessPointPreference.java38 UserBadgeCache cache, @DrawableRes int iconResId, boolean forSavedNetworks) {
39 super(accessPoint, context, cache, iconResId, forSavedNetworks);
37 ConnectedAccessPointPreference(AccessPoint accessPoint, Context context, UserBadgeCache cache, @DrawableRes int iconResId, boolean forSavedNetworks) argument
/packages/apps/SecureElement/src/com/android/se/security/arf/
H A DArfController.java53 public ArfController(AccessRuleCache cache, Terminal terminal) { argument
54 mAccessRuleCache = cache;
/packages/apps/UnifiedEmail/src/com/android/mail/bitmap/
H A DAccountAvatarDrawable.java32 public AccountAvatarDrawable(final Resources res, final BitmapCache cache, argument
35 setBitmapCache(cache);
/packages/apps/Email/provider_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/Dialer/java/com/android/dialer/app/contactinfo/
H A DContactInfoCache.java37 * This is a cache of contact details for the phone numbers in the call log. The key is the phone
38 * number with the country in which the call was placed or received. The content of the cache is
41 * <p>This cache queues request for information and queries for information on a background thread,
54 private final ExpirableCache<NumberWithCountryIso, ContactInfo> cache; field in class:ContactInfoCache
93 cache = internalCache;
110 ExpirableCache.CachedValue<ContactInfo> cachedInfo = cache.getCachedValue(numberCountryIso);
117 cache.put(numberCountryIso, ContactInfo.EMPTY);
148 * <p>Upon completion it also updates the cache in the call log, if it is different from {@code
153 * <p>It returns true if it updated the content of the cache and we should therefore tell the view
194 // Check the existing entry in the cache
[all...]
/packages/apps/UnifiedEmail/src/com/android/mail/drawer/
H A DAccountDrawerItem.java37 int unreadCount, boolean isCurrentAccount, BitmapCache cache,
41 mImagesCache = cache;
36 AccountDrawerItem(ControllableActivity activity, Account account, int unreadCount, boolean isCurrentAccount, BitmapCache cache, ContactResolver contactResolver) argument
/packages/apps/Launcher3/src/com/android/launcher3/compat/
H A DShortcutConfigActivityInfo.java69 public abstract Drawable getFullResIcon(IconCache cache); argument
122 public Drawable getFullResIcon(IconCache cache) { argument
123 return cache.getFullResIcon(mInfo);
143 public Drawable getFullResIcon(IconCache cache) { argument
144 return cache.getFullResIcon(mInfo);
/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);
/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/Launcher3/src/com/android/launcher3/logging/
H A DLoggerUtils.java48 SparseArray<String> cache;
50 cache = sNameCache.get(c);
51 if (cache == null) {
52 cache = new SparseArray<>();
57 cache.put(f.getInt(null), f.getName());
63 sNameCache.put(c, cache);
66 String result = cache.get(value);
/packages/apps/StorageManager/src/com/android/storagemanager/deletionhelper/
H A DAppDeletionPreferenceGroup.java56 PreferenceListCache cache = new PreferenceListCache(this);
66 (AppDeletionPreference) cache.getCachedPreference(packageName);
77 cache.removeCachedPrefs();
H A DDownloadsDeletionPreferenceGroup.java161 PreferenceListCache cache = new PreferenceListCache(this);
169 (DownloadsFilePreference) cache.getCachedPreference(file.getPath());
181 cache.removeCachedPrefs();
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/
H A DLetterTileProvider.java138 final Bitmap[] cache = (getDefault) ? mDefaultBitmapCache : mBitmapBackgroundCache;
140 Bitmap bitmap = cache[pos];
150 cache[pos] = bitmap;

Completed in 3613 milliseconds

1234