/packages/modules/Bluetooth/system/gd/common/ |
D | lru_cache_test.cc | 30 LruCache<int, int> cache(3); // capacity = 3; in TEST() local 31 EXPECT_EQ(cache.size(), 0ul); in TEST() 32 EXPECT_EQ(cache.find(42), cache.end()); in TEST() 33 cache.clear(); // should not crash in TEST() 34 EXPECT_EQ(cache.find(42), cache.end()); in TEST() 35 EXPECT_FALSE(cache.contains(42)); in TEST() 36 EXPECT_FALSE(cache.extract(42)); in TEST() 72 LruCache<int, int> cache(2); in TEST() local 73 cache.insert_or_assign(1, 10); in TEST() 74 cache.insert_or_assign(2, 20); in TEST() [all …]
|
/packages/modules/Bluetooth/system/common/ |
D | lru_unittest.cc | 33 LegacyLruCache<int, int> cache(3, "testing"); // capacity = 3; in TEST() local 34 cache.Put(1, 10); in TEST() 35 EXPECT_EQ(cache.Size(), 1); in TEST() 36 EXPECT_FALSE(cache.Put(2, 20)); in TEST() 37 EXPECT_FALSE(cache.Put(3, 30)); in TEST() 38 EXPECT_EQ(cache.Size(), 3); in TEST() 41 EXPECT_TRUE(cache.Get(1, value)); in TEST() 43 EXPECT_TRUE(cache.Get(2, value)); in TEST() 45 EXPECT_TRUE(cache.Get(3, value)); in TEST() 47 EXPECT_EQ(cache.Size(), 3); in TEST() [all …]
|
/packages/apps/Gallery/tests/src/com/android/camera/gallery/ |
D | LruCacheUnitTests.java | 9 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/modules/DnsResolver/ |
D | res_cache.cpp | 1007 cache = std::make_unique<Cache>(); in NetConfig() 1030 std::unique_ptr<Cache> cache; member 1060 static bool cache_has_pending_request_locked(Cache* cache, const Entry* key, in cache_has_pending_request_locked() argument 1062 if (!cache || !key) return false; in cache_has_pending_request_locked() 1064 Cache::pending_req_info* ri = cache->pending_requests.next; in cache_has_pending_request_locked() 1065 Cache::pending_req_info* prev = &cache->pending_requests; in cache_has_pending_request_locked() 1085 static void cache_notify_waiting_tid_locked(struct Cache* cache, const Entry* key) { in cache_notify_waiting_tid_locked() argument 1086 if (!cache || !key) return; in cache_notify_waiting_tid_locked() 1088 Cache::pending_req_info* ri = cache->pending_requests.next; in cache_notify_waiting_tid_locked() 1089 Cache::pending_req_info* prev = &cache->pending_requests; in cache_notify_waiting_tid_locked() [all …]
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/media/ |
D | MediaCacheManager.java | 50 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/Gallery2/src/com/android/gallery3d/filtershow/pipeline/ |
D | CacheProcessing.java | 22 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 …]
|
D | FilterEnvironment.java | 24 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()
|
D | Buffer.java | 24 import com.android.gallery3d.filtershow.cache.BitmapCache; 37 BitmapCache cache = PrimaryImage.getImage().getBitmapCache(); in Buffer() local 38 mBitmap = cache.getBitmapCopy(bitmap, BitmapCache.PREVIEW_CACHE); in Buffer() 91 BitmapCache cache = PrimaryImage.getImage().getBitmapCache(); in remove() local 92 if (cache.cache(mBitmap)) { in remove()
|
/packages/modules/DnsResolver/doh/ |
D | config.rs | 202 let cache = Cache::new(); in different_keys() localVariable 206 let config_a = cache.get(&key_a).unwrap(); in different_keys() 207 let config_b = cache.get(&key_b).unwrap(); in different_keys() 208 let _config_b = cache.get(&key_b).unwrap(); in different_keys() 209 let config_c = cache.get(&key_c).unwrap(); in different_keys() 210 let _config_c = cache.get(&key_c).unwrap(); in different_keys() 222 let cache = Cache::new(); in lifetimes() localVariable 225 let config_none = cache.get(&Key { cert_path: None, max_idle_timeout: 1000 }).unwrap(); in lifetimes() 226 let config_a = cache.get(&key_a).unwrap(); in lifetimes() 227 let config_b = cache.get(&key_b).unwrap(); in lifetimes() [all …]
|
/packages/apps/Dialer/java/com/android/dialer/logging/ |
D | contact_lookup_result.proto | 39 // Number was found in Dialer's local cache but we don't know how it was 43 // Number was found in Dialer's local cache and was originally identified 47 // Number was found in Dialer's local cache and was originally identified 51 // Number was found in Dialer's local cache and was originally identified 55 // Number was found in Dialer's local cache and was originally identified 59 // Number was found in Dialer's local cache and was originally identified 64 // Number was found in Dialer's local cache and was originally identified 71 // Number was found in Dialer's local cache and was originally identified 78 // Number was found in Dialer's local cache and was originally identified 85 // Number was found in Dialer's local cache and was originally identified [all …]
|
/packages/apps/Dialer/java/com/android/dialer/util/ |
D | ExpirableCache.java | 103 private LruCache<K, CachedValue<V>> cache; field in ExpirableCache 105 private ExpirableCache(LruCache<K, CachedValue<V>> cache) { in ExpirableCache() argument 106 this.cache = cache; in ExpirableCache() 121 public static <K, V> ExpirableCache<K, V> create(LruCache<K, CachedValue<V>> cache) { in create() argument 122 return new ExpirableCache<K, V>(cache); in create() 150 return cache.get(key); in getCachedValue() 193 cache.put(key, newCachedValue(value)); in put()
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/ |
D | MemoryCacheManager.java | 45 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/Contacts/src/com/android/contacts/ |
D | SplitAggregateView.java | 240 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/Launcher3/src/com/android/launcher3/allapps/ |
D | WorkPausedCard.java | 60 StringCache cache = mActivityContext.getStringCache(); in onFinishInflate() local 61 if (cache != null) { in onFinishInflate() 62 setWorkProfilePausedResources(cache); in onFinishInflate() 66 private void setWorkProfilePausedResources(StringCache cache) { in setWorkProfilePausedResources() argument 68 title.setText(cache.workProfilePausedTitle); in setWorkProfilePausedResources() 71 body.setText(cache.workProfilePausedDescription); in setWorkProfilePausedResources() 74 button.setText(cache.workProfileEnableButton); in setWorkProfilePausedResources()
|
/packages/apps/Dialer/java/com/android/dialer/app/contactinfo/ |
D | ContactInfoCache.java | 54 private final ExpirableCache<NumberWithCountryIso, ContactInfo> cache; field in ContactInfoCache 93 cache = internalCache; in ContactInfoCache() 110 ExpirableCache.CachedValue<ContactInfo> cachedInfo = cache.getCachedValue(numberCountryIso); in getValue() 117 cache.put(numberCountryIso, ContactInfo.EMPTY); in getValue() 198 ContactInfo existingInfo = cache.getPossiblyExpired(numberCountryIso); in queryContactInfo() 213 cache.put(numberCountryIso, info); in queryContactInfo() 267 cache.expireAll(); in invalidate() 327 cache.put(numberCountryIso, contactInfo); in injectContactInfoForTest()
|
/packages/modules/IntentResolver/java/src-debug/com/android/intentresolver/flags/ |
D | DebugFeatureFlagRepository.kt | 33 private val cache = hashMapOf<String, Boolean>() constant 40 synchronized(cache) { in isEnabled() 41 cache[flag.name]?.let { return it } in isEnabled() 44 return synchronized(cache) { in isEnabled() 46 cache.getOrPut(flag.name) { flagValue } in isEnabled()
|
/packages/apps/Gallery2/src/com/android/gallery3d/util/ |
D | CacheManager.java | 46 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/modules/Bluetooth/system/gd/storage/ |
D | legacy_config_file.cc | 43 ConfigCache cache(temp_devices_capacity, Device::kLinkKeyProperties); in Read() local 67 cache.SetProperty(section, tokens[0], std::move(tokens[1])); in Read() 70 return cache; in Read() 73 bool LegacyConfigFile::Write(const ConfigCache& cache) { in Write() argument 74 return os::WriteToFile(path_, cache.SerializeToLegacyFormat()); in Write()
|
/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
D | LocalMergeAlbum.java | 228 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/modules/IntentResolver/java/src/com/android/intentresolver/ |
D | ImagePreviewImageLoader.kt | 49 private val cache = LruCache<Uri, CompletableDeferred<Bitmap?>>(cacheSize) in <lambda>() constant 63 uris.asSequence().take(cache.maxSize()).forEach { uri -> in <lambda>() 71 return synchronized(cache) { in <lambda>() 72 cache.get(uri) ?: CompletableDeferred<Bitmap?>().also { result -> in <lambda>() 73 cache.put(uri, result) in <lambda>()
|
/packages/providers/MediaProvider/src/com/android/providers/media/util/ |
D | CachedSupplier.java | 23 private volatile T cache; field in CachedSupplier 31 if (cache == null) { in get() 32 cache = wrapped.get(); in get() 34 return cache; in get()
|
/packages/modules/Bluetooth/system/embdrv/lc3/test/ |
D | bitstream.py | 110 self.cache = -1 139 if self.cache >= 0: 140 self.bytes[self.bp] = self.cache + self.carry 148 self.cache = self.low >> 16 178 if self.cache >= 0: 217 val = self.cache 220 self.bytes[self.bp] = self.cache
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/ |
D | DictionaryFacilitatorLruCacheTests.java | 37 final DictionaryFacilitatorLruCache cache = in testGetFacilitator() local 40 final DictionaryFacilitator dictionaryFacilitatorEnUs = cache.get(Locale.US); in testGetFacilitator() 44 final DictionaryFacilitator dictionaryFacilitatorFr = cache.get(Locale.FRENCH); in testGetFacilitator() 48 final DictionaryFacilitator dictionaryFacilitatorDe = cache.get(Locale.GERMANY); in testGetFacilitator()
|
/packages/modules/Bluetooth/system/embdrv/lc3/src/ |
D | bits.c | 52 ((ac->cache >= 0) + ac->carry_count) * 8; in ac_get_pending_bits() 90 .cache = -1 in lc3_setup_bits() 175 if (ac->cache >= 0) in ac_shift() 176 ac_put(buffer, ac->cache + ac->carry); in ac_shift() 181 ac->cache = ac->low >> 16; in ac_shift() 227 int end_val = ac->cache >> (8 - nbits); in ac_terminate() 230 ac_put(buffer, ac->cache); in ac_terminate()
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/cache/ |
D | BitmapCache.java | 17 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
|