Home
last modified time | relevance | path

Searched refs:cache (Results 1 – 25 of 96) sorted by relevance

1234

/aosp14/frameworks/base/core/tests/coretests/src/android/util/
H A DLruCacheTest.java149 cache.put("a", "A"); in testToString()
150 cache.put("b", "B"); in testToString()
151 cache.put("c", "C"); in testToString()
152 cache.put("d", "D"); in testToString()
211 cache.put("a", ""); in testCustomSizesImpactsSize()
252 cache.put("a", a); in testEvictionThrowsWhenSizesAreInconsistent()
308 cache.evictAll(); in testEvictAll()
322 cache.evictAll(); in testEvictAllEvictsSizeZeroElements()
334 cache.remove("a"); in testRemoveWithCustomSizes()
359 cache.remove("a"); in testRemoveCallsEntryRemoved()
[all …]
H A DHashedStringCacheTest.java55 HashedStringCache cache = HashedStringCache.getInstance(); in testInstanceNotNull() local
56 assertThat(cache, is(notNullValue())); in testInstanceNotNull()
62 assertThat(HashedStringCache.getInstance(), is(cache)); in testInstanceMatchesOnSecondCall()
69 cache.hashString(mContext, TAG, TEST_STRING, 7); in testHashedStringNotOriginalString()
77 cache.hashString(mContext, TAG, TEST_STRING, 7); in testThatMultipleCallsResultInSameHash()
79 cache.hashString(mContext, TAG, TEST_STRING, 7); in testThatMultipleCallsResultInSameHash()
88 cache.hashString(mContext, TAG, TEST_STRING, 7); in testThatMultipleInputResultInDifferentHash()
98 cache.hashString(mContext, TAG, TEST_STRING, 7); in testThatZeroDaysResultsInNewHash()
141 cache.hashString(mContext, TAG, "", -1); in testEmptyStringInput()
149 cache.hashString(mContext, TAG, null, -1); in testNullInput()
[all …]
/aosp14/system/core/libutils/
H A DLruCache_test.cpp266 cache.clear(); in TEST_F()
292 cache.clear(); in TEST_F()
324 cache.clear(); in TEST_F()
344 cache.clear(); in TEST_F()
350 cache.put(1, 4); in TEST_F()
351 cache.put(2, 5); in TEST_F()
352 cache.put(3, 6); in TEST_F()
381 cache.put(1, 2); in TEST_F()
393 cache.put(1, 2); in TEST_F()
395 cache.remove(1); in TEST_F()
[all …]
H A DLruCache_fuzz.cpp37 [](FuzzedDataProvider*, FuzzCache* cache) -> void { cache->removeOldest(); }, in __anon7e851e960102()
38 [](FuzzedDataProvider*, FuzzCache* cache) -> void { cache->peekOldestValue(); }, in __anon7e851e960202()
39 [](FuzzedDataProvider*, FuzzCache* cache) -> void { cache->clear(); }, in __anon7e851e960302()
40 [](FuzzedDataProvider*, FuzzCache* cache) -> void { cache->size(); }, in __anon7e851e960402()
41 [](FuzzedDataProvider*, FuzzCache* cache) -> void { in __anon7e851e960502()
51 cache->put(key, val); in __anon7e851e960602()
55 cache->get(key); in __anon7e851e960702()
59 cache->remove(key); in __anon7e851e960802()
62 cache->setOnEntryRemovedListener(&callback); in __anon7e851e960902()
67 FuzzCache cache(MAX_CACHE_ENTRIES); in LLVMFuzzerTestOneInput() local
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/android/app/
H A DPropertyInvalidatedCacheTests.java240 cache.invalidateCache(); in testCacheRecompute()
248 cache.invalidateCache(); in testCacheRecompute()
265 cache.invalidateCache(); in testCacheInitialState()
286 cache.invalidateCache(); in testCacheDisableState()
290 cache.disableSystemWide(); in testCacheDisableState()
310 cache.invalidateCache(); in testRefreshSameObject()
332 cache.invalidateCache(); in testRefreshInvalidateRace()
345 cache.invalidateCache(); in testLocalProcessDisable()
351 cache.disableLocal(); in testLocalProcessDisable()
376 cache.invalidateCache(); in testOnTrimMemory()
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/android/content/pm/
H A DRegisteredServicesCacheTest.java87 assertNotEmptyFileCreated(cache, U0); in testGetAllServicesHappyPath()
89 cache = new TestServicesCache(); in testGetAllServicesHappyPath()
97 cache.getAllServices(U0); in testGetAllServicesReplaceUid()
99 cache.invalidateCache(U0); in testGetAllServicesReplaceUid()
100 cache.clearServicesForQuerying(); in testGetAllServicesReplaceUid()
122 cache = new TestServicesCache(); in testGetAllServicesServiceRemoved()
141 cache = new TestServicesCache(); in testGetAllServicesMultiUser()
144 assertNotEmptyFileCreated(cache, U0); in testGetAllServicesMultiUser()
156 cache.onUserRemoved(U1); in testOnRemove()
158 cache.clearServicesForQuerying(); in testOnRemove()
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/android/os/
H A DIpcDataCacheTest.java295 TestCache cache = new TestCache(); in testCacheRecompute() local
296 cache.invalidateCache(); in testCacheRecompute()
304 cache.invalidateCache(); in testCacheRecompute()
317 TestCache cache = new TestCache(); in testCacheInitialState() local
321 cache.invalidateCache(); in testCacheInitialState()
338 TestCache cache = new TestCache(); in testCacheDisableState() local
342 cache.invalidateCache(); in testCacheDisableState()
346 cache.disableSystemWide(); in testCacheDisableState()
358 TestCache cache = new TestCache(); in testLocalProcessDisable() local
360 cache.invalidateCache(); in testLocalProcessDisable()
[all …]
/aosp14/frameworks/base/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/
H A DProgramInfoCacheTest.java78 cache.updateFromHalProgramListChunk(chunk); in testUpdateFromHal()
80 assertTrue(cache.isComplete()); in testUpdateFromHal()
91 cache.updateFromHalProgramListChunk(chunk); in testUpdateFromHal()
93 assertFalse(cache.isComplete()); in testUpdateFromHal()
98 ProgramInfoCache cache = new ProgramInfoCache(null, true); in testNullFilter() local
99 cache.filterAndUpdateFrom(mAllProgramInfos, false); in testNullFilter()
108 cache.filterAndUpdateFrom(mAllProgramInfos, false); in testEmptyFilter()
120 cache.filterAndUpdateFrom(mAllProgramInfos, false); in testFilterByType()
131 cache.filterAndUpdateFrom(mAllProgramInfos, false); in testFilterByIdentifier()
139 cache.filterAndUpdateFrom(mAllProgramInfos, false); in testFilterExcludeCategories()
[all …]
/aosp14/frameworks/base/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/
H A DProgramInfoCacheTest.java138 cache.updateFromHalProgramListChunk(chunk); in updateFromHalProgramListChunk_withPurgingCompleteChunk()
141 .that(cache.toProgramInfoList()) in updateFromHalProgramListChunk_withPurgingCompleteChunk()
157 cache.updateFromHalProgramListChunk(chunk); in updateFromHalProgramListChunk_withNonPurgingIncompleteChunk()
160 .that(cache.toProgramInfoList()) in updateFromHalProgramListChunk_withNonPurgingIncompleteChunk()
173 .that(cache.toProgramInfoList()) in filterAndUpdateFromInternal_withNullFilter()
187 .that(cache.toProgramInfoList()) in filterAndUpdateFromInternal_withEmptyFilter()
202 .that(cache.toProgramInfoList()) in filterAndUpdateFromInternal_withFilterByIdentifierType()
240 .that(cache.toProgramInfoList()) in filterAndUpdateFromInternal_withFilterExcludingCategories()
265 .that(cache.toProgramInfoList()) in filterAndUpdateFromInternal_withFilterExcludingModifications()
311 .that(cache.toProgramInfoList()) in filterAndApplyChunkInternal_withPurgingIncompleteChunk()
[all …]
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/controls/
H A DCustomIconCache.kt36 private val cache: MutableMap<String, Icon> = LinkedHashMap()
49 synchronized(cache) {
51 cache.put(controlId, icon)
53 cache.remove(controlId)
66 return synchronized(cache) {
67 cache.get(controlId)
72 synchronized(cache) {
73 cache.clear()
/aosp14/frameworks/base/libs/hwui/tests/unit/
H A DShaderCacheTests.cpp55 cache.mBlobCache.reset(nullptr); in reinitializeAllFields()
56 cache.mFilename = newCache.mFilename; in reinitializeAllFields()
57 cache.mIDHash.clear(); in reinitializeAllFields()
75 std::lock_guard lock(cache.mMutex); in setSaveDelayMs()
84 std::lock_guard lock(cache.mMutex); in terminate()
86 cache.saveToDiskLocked(); in terminate()
88 cache.mBlobCache = NULL; in terminate()
96 std::lock_guard lock(cache.mMutex); in validateCache()
112 std::lock_guard lock(cache.mMutex); in waitForPendingSave()
113 ASSERT_TRUE(cache.mSavePending); in waitForPendingSave()
[all …]
/aosp14/frameworks/base/core/java/android/net/
H A DSSLSessionCache.java59 public static void install(SSLSessionCache cache, SSLContext context) { in install() argument
63 cache == null ? null : cache.mSessionCache); in install()
76 public SSLSessionCache(Object cache) { in SSLSessionCache() argument
77 mSessionCache = (SSLClientSessionCache) cache; in SSLSessionCache()
100 SSLClientSessionCache cache = null; in SSLSessionCache() local
102 cache = FileClientSessionCache.usingDirectory(dir); in SSLSessionCache()
106 mSessionCache = cache; in SSLSessionCache()
H A DSSLCertificateSocketFactory.java144 int handshakeTimeoutMillis, SSLSessionCache cache, boolean secure) { in SSLCertificateSocketFactory() argument
146 mSessionCache = cache == null ? null : cache.mSessionCache; in SSLCertificateSocketFactory()
170 public static SSLSocketFactory getDefault(int handshakeTimeoutMillis, SSLSessionCache cache) { in getDefault() argument
171 return new SSLCertificateSocketFactory(handshakeTimeoutMillis, cache, true); in getDefault()
186 public static SSLSocketFactory getInsecure(int handshakeTimeoutMillis, SSLSessionCache cache) { in getInsecure() argument
187 return new SSLCertificateSocketFactory(handshakeTimeoutMillis, cache, false); in getInsecure()
208 int handshakeTimeoutMillis, SSLSessionCache cache) { in getHttpSocketFactory() argument
210 new SSLCertificateSocketFactory(handshakeTimeoutMillis, cache, true)); in getHttpSocketFactory()
/aosp14/frameworks/base/services/tests/uiservicestests/src/com/android/server/slice/
H A DPackageMatchingCacheTest.java43 private final PackageMatchingCache cache = new PackageMatchingCache(supplier); field in PackageMatchingCacheTest
48 cache.matches(null); in testNulls()
52 cache.matches(""); in testNulls()
60 assertTrue(cache.matches("ret.pkg")); in testCaching()
61 assertTrue(cache.matches("ret.pkg")); in testCaching()
62 assertTrue(cache.matches("ret.pkg")); in testCaching()
70 assertTrue(cache.matches("ret.pkg")); in testGetOnFailure()
73 assertTrue(cache.matches("other.pkg")); in testGetOnFailure()
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/
H A DNetworkTypeResIdCacheTest.kt31 private lateinit var cache: NetworkTypeResIdCache
36 cache = NetworkTypeResIdCache(overrides)
41 assertThat(cache.get(group1, CARRIER_1, context)).isEqualTo(iconDefault1)
49 assertThat(cache.get(group1, CARRIER_1, context)).isEqualTo(iconOverride1)
57 assertThat(cache.get(group1, CARRIER_2, context)).isEqualTo(iconDefault1)
65 assertThat(cache.get(group2, CARRIER_1, context)).isEqualTo(iconDefault2)
/aosp14/frameworks/base/packages/SettingsLib/src/com/android/settingslib/wifi/
H A DWifiRestrictionsCache.java58 WifiRestrictionsCache cache; in getInstance() local
65 cache = new WifiRestrictionsCache(context); in getInstance()
66 sInstances.put(context.getUserId(), cache); in getInstance() local
68 return cache; in getInstance()
78 WifiRestrictionsCache cache = sInstances.get(key); in clearInstance() local
79 cache.clearRestrictions(); in clearInstance()
/aosp14/frameworks/base/services/core/java/com/android/server/hdmi/
H A DHdmiLogger.java112 private static String updateLog(HashMap<String, Pair<Long, Integer>> cache, String logMessage) { in updateLog() argument
114 Pair<Long, Integer> timing = cache.get(logMessage); in updateLog()
117 cache.put(logMessage, new Pair<>(curTime, 1)); in updateLog()
120 increaseLogCount(cache, logMessage); in updateLog()
131 private static void increaseLogCount(HashMap<String, Pair<Long, Integer>> cache, in increaseLogCount() argument
133 Pair<Long, Integer> timing = cache.get(message); in increaseLogCount()
135 cache.put(message, new Pair<>(timing.first, timing.second + 1)); in increaseLogCount()
/aosp14/frameworks/base/core/tests/coretests/src/android/view/accessibility/
H A DAccessibilityInteractionClientTest.java101 AccessibilityCache cache = AccessibilityInteractionClient.getCache( in getCache_addConnectionWithoutCache_returnsNullCache() local
103 assertNull(cache); in getCache_addConnectionWithoutCache_returnsNullCache()
108 AccessibilityCache cache = AccessibilityInteractionClient.getCache(MOCK_CONNECTION_ID); in getCache_removeConnection_returnsNull() local
109 assertNotNull(cache); in getCache_removeConnection_returnsNull()
112 cache = AccessibilityInteractionClient.getCache(MOCK_CONNECTION_ID); in getCache_removeConnection_returnsNull()
113 assertNull(cache); in getCache_removeConnection_returnsNull()
/aosp14/frameworks/base/core/java/android/view/accessibility/
H A DAccessibilityInteractionClient.java403 if (cache != null) { in getWindow()
490 if (cache != null) { in getWindowsOnAllDisplays()
523 if (cache != null) { in getWindowsOnAllDisplays()
606 if (cache != null) { in findAccessibilityNodeInfoByAccessibilityId()
941 if (cache != null) { in findFocus()
1127 if (cache == null) { in clearCache()
1130 cache.clear(); in clearCache()
1152 if (cache == null) { in onAccessibilityEvent()
1158 cache.onAccessibilityEvent(event); in onAccessibilityEvent()
1445 if (cache == null) { in finalizeAndCacheAccessibilityNodeInfo()
[all …]
/aosp14/frameworks/base/location/java/android/location/
H A DLocation.java209 BearingDistanceCache cache = sBearingDistanceCache.get(); in distanceTo() local
211 if (mLatitudeDegrees != cache.mLat1 || mLongitudeDegrees != cache.mLon1 in distanceTo()
212 || dest.mLatitudeDegrees != cache.mLat2 || dest.mLongitudeDegrees != cache.mLon2) { in distanceTo()
216 return cache.mDistance; in distanceTo()
231 if (mLatitudeDegrees != cache.mLat1 || mLongitudeDegrees != cache.mLon1 in bearingTo()
232 || dest.mLatitudeDegrees != cache.mLat2 || dest.mLongitudeDegrees != cache.mLon2) { in bearingTo()
236 return cache.mInitialBearing; in bearingTo()
1338 endLatitude, endLongitude, cache); in distanceBetween()
1339 results[0] = cache.mDistance; in distanceBetween()
1341 results[1] = cache.mInitialBearing; in distanceBetween()
[all …]
/aosp14/frameworks/base/core/java/android/content/res/
H A DThemedResourceCache.java184 LongSparseArray<WeakReference<T>> cache = mThemedEntries.get(key); in getThemedLocked() local
185 if (cache == null && create) { in getThemedLocked()
186 cache = new LongSparseArray<>(1); in getThemedLocked()
189 mThemedEntries.put(keyClone, cache); in getThemedLocked()
192 return cache; in getThemedLocked()
/aosp14/frameworks/base/core/tests/coretests/src/android/view/
H A DBigCacheTest.java70 final Bitmap[] cache = new Bitmap[1]; in createCacheForView() local
76 cache[0] = view.getDrawingCache(); in createCacheForView()
80 return cache[0]; in createCacheForView()
H A DZeroSizedTest.java89 final Bitmap[] cache = new Bitmap[1]; in createCacheForView() local
95 cache[0] = view.getDrawingCache(); in createCacheForView()
99 return cache[0]; in createCacheForView()
/aosp14/frameworks/base/tools/bit/
H A Dmake.cpp101 map<string,string> cache; in BuildVars() local
111 cache[name] = value.asString(); in BuildVars()
117 if (map_contains(cache, "TARGET_PRODUCT", buildProduct) in BuildVars()
118 && map_contains(cache, "TARGET_BUILD_VARIANT", buildVariant) in BuildVars()
119 && map_contains(cache, "TARGET_BUILD_TYPE", buildType)) { in BuildVars()
120 m_cache = cache; in BuildVars()
/aosp14/frameworks/base/graphics/java/android/graphics/fonts/
H A DSystemFonts.java97 @NonNull Map<String, ByteBuffer> cache) { in pushFamilyToFallback() argument
122 defaultFonts, languageTags, variant, false, cache); in pushFamilyToFallback()
140 cache); in pushFamilyToFallback()
157 @NonNull Map<String, ByteBuffer> cache) { in createFontFamily() argument
166 ByteBuffer buffer = cache.get(fullPath); in createFontFamily()
168 if (cache.containsKey(fullPath)) { in createFontFamily()
172 cache.put(fullPath, buffer); in createFontFamily()

1234