/packages/apps/Messaging/src/com/android/messaging/datamodel/media/ |
H A D | MediaCacheManager.java | 50 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 D | MemoryCacheManager.java | 36 * 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 D | LruCacheUnitTests.java | 9 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 D | DictionaryFacilitatorLruCacheTests.java | 27 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 D | ExpirableCache.java | 25 * 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 D | CacheManager.java | 31 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 D | Buffer.java | 24 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 D | CacheProcessing.java | 22 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 D | FilterEnvironment.java | 24 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 D | ContentCacheTests.java | 180 // 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 D | LongPressAccessPointPreference.java | 31 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 D | ConnectedAccessPointPreference.java | 38 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 D | ArfController.java | 53 public ArfController(AccessRuleCache cache, Terminal terminal) { argument 54 mAccessRuleCache = cache;
|
/packages/apps/UnifiedEmail/src/com/android/mail/bitmap/ |
H A D | AccountAvatarDrawable.java | 32 public AccountAvatarDrawable(final Resources res, final BitmapCache cache, argument 35 setBitmapCache(cache);
|
/packages/apps/Email/provider_src/com/android/email/provider/ |
H A D | ContentCache.java | 40 * 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 D | SplitAggregateView.java | 240 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 D | ContactInfoCache.java | 37 * 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 D | AccountDrawerItem.java | 37 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 D | ShortcutConfigActivityInfo.java | 69 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 D | LocalMergeAlbum.java | 228 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 D | BitmapCache.java | 17 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 D | LoggerUtils.java | 48 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 D | AppDeletionPreferenceGroup.java | 56 PreferenceListCache cache = new PreferenceListCache(this); 66 (AppDeletionPreference) cache.getCachedPreference(packageName); 77 cache.removeCachedPrefs();
|
H A D | DownloadsDeletionPreferenceGroup.java | 161 PreferenceListCache cache = new PreferenceListCache(this); 169 (DownloadsFilePreference) cache.getCachedPreference(file.getPath()); 181 cache.removeCachedPrefs();
|
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/ |
H A D | LetterTileProvider.java | 138 final Bitmap[] cache = (getDefault) ? mDefaultBitmapCache : mBitmapBackgroundCache; 140 Bitmap bitmap = cache[pos]; 150 cache[pos] = bitmap;
|