/frameworks/base/core/tests/coretests/src/android/util/ |
D | LruCacheTest.java | 35 LruCache<String, String> cache = new LruCache<String, String>(3); in testStatistics() local 36 assertStatistics(cache); in testStatistics() 38 assertEquals(null, cache.put("a", "A")); in testStatistics() 40 assertStatistics(cache); in testStatistics() 41 assertHit(cache, "a", "A"); in testStatistics() 42 assertSnapshot(cache, "a", "A"); in testStatistics() 44 assertEquals(null, cache.put("b", "B")); in testStatistics() 46 assertStatistics(cache); in testStatistics() 47 assertHit(cache, "a", "A"); in testStatistics() 48 assertHit(cache, "b", "B"); in testStatistics() [all …]
|
D | HashedStringCacheTest.java | 55 HashedStringCache cache = HashedStringCache.getInstance(); in testInstanceNotNull() local 56 assertThat(cache, is(notNullValue())); in testInstanceNotNull() 61 HashedStringCache cache = HashedStringCache.getInstance(); in testInstanceMatchesOnSecondCall() local 62 assertThat(HashedStringCache.getInstance(), is(cache)); in testInstanceMatchesOnSecondCall() 67 HashedStringCache cache = HashedStringCache.getInstance(); in testHashedStringNotOriginalString() local 69 cache.hashString(mContext, TAG, TEST_STRING, 7); in testHashedStringNotOriginalString() 75 HashedStringCache cache = HashedStringCache.getInstance(); in testThatMultipleCallsResultInSameHash() local 77 cache.hashString(mContext, TAG, TEST_STRING, 7); in testThatMultipleCallsResultInSameHash() 79 cache.hashString(mContext, TAG, TEST_STRING, 7); in testThatMultipleCallsResultInSameHash() 86 HashedStringCache cache = HashedStringCache.getInstance(); in testThatMultipleInputResultInDifferentHash() local [all …]
|
/frameworks/base/core/tests/coretests/src/android/app/ |
D | PropertyInvalidatedCacheTests.java | 239 TestCache cache = new TestCache(); in testCacheRecompute() local 240 cache.invalidateCache(); in testCacheRecompute() 241 assertEquals(cache.isDisabled(), false); in testCacheRecompute() 242 assertEquals("foo5", cache.query(5)); in testCacheRecompute() 243 assertEquals(1, cache.getRecomputeCount()); in testCacheRecompute() 244 assertEquals("foo5", cache.query(5)); in testCacheRecompute() 245 assertEquals(1, cache.getRecomputeCount()); in testCacheRecompute() 246 assertEquals("foo6", cache.query(6)); in testCacheRecompute() 247 assertEquals(2, cache.getRecomputeCount()); in testCacheRecompute() 248 cache.invalidateCache(); in testCacheRecompute() [all …]
|
/frameworks/base/core/tests/coretests/src/android/content/pm/ |
D | RegisteredServicesCacheTest.java | 81 TestServicesCache cache = new TestServicesCache(); in testGetAllServicesHappyPath() local 82 cache.addServiceForQuerying(U0, r1, newServiceInfo(t1, UID1)); in testGetAllServicesHappyPath() 83 cache.addServiceForQuerying(U0, r2, newServiceInfo(t2, UID2)); in testGetAllServicesHappyPath() 84 assertEquals(2, cache.getAllServicesSize(U0)); in testGetAllServicesHappyPath() 85 assertEquals(2, cache.getPersistentServicesSize(U0)); in testGetAllServicesHappyPath() 86 assertNotEmptyFileCreated(cache, U0); in testGetAllServicesHappyPath() 88 cache = new TestServicesCache(); in testGetAllServicesHappyPath() 89 assertEquals(2, cache.getPersistentServicesSize(U0)); in testGetAllServicesHappyPath() 93 TestServicesCache cache = new TestServicesCache(); in testGetAllServicesReplaceUid() local 94 cache.addServiceForQuerying(U0, r1, newServiceInfo(t1, UID1)); in testGetAllServicesReplaceUid() [all …]
|
/frameworks/base/core/tests/coretests/src/android/os/ |
D | IpcDataCacheTest.java | 295 TestCache cache = new TestCache(); in testCacheRecompute() local 296 cache.invalidateCache(); in testCacheRecompute() 297 assertEquals(cache.isDisabled(), false); in testCacheRecompute() 298 assertEquals("foo5", cache.query(5)); in testCacheRecompute() 299 assertEquals(1, cache.getRecomputeCount()); in testCacheRecompute() 300 assertEquals("foo5", cache.query(5)); in testCacheRecompute() 301 assertEquals(1, cache.getRecomputeCount()); in testCacheRecompute() 302 assertEquals("foo6", cache.query(6)); in testCacheRecompute() 303 assertEquals(2, cache.getRecomputeCount()); in testCacheRecompute() 304 cache.invalidateCache(); in testCacheRecompute() [all …]
|
/frameworks/base/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/ |
D | ProgramInfoCacheTest.java | 70 ProgramInfoCache cache = new ProgramInfoCache(null, false, mAmFmInfo); in testUpdateFromHal() local 76 cache.updateFromHalProgramListChunk(chunk); in testUpdateFromHal() 77 assertTrue(cache.programInfosAreExactly(mRdsInfo, mDabEnsembleInfo)); in testUpdateFromHal() 78 assertTrue(cache.isComplete()); in testUpdateFromHal() 89 cache.updateFromHalProgramListChunk(chunk); in testUpdateFromHal() 90 assertTrue(cache.programInfosAreExactly(updatedRdsInfo, mVendorCustomInfo)); in testUpdateFromHal() 91 assertFalse(cache.isComplete()); in testUpdateFromHal() 96 ProgramInfoCache cache = new ProgramInfoCache(null, true); in testNullFilter() local 97 cache.filterAndUpdateFrom(mAllProgramInfos, false); in testNullFilter() 98 assertTrue(cache.programInfosAreExactly(mAmFmInfo, mRdsInfo, mDabEnsembleInfo, in testNullFilter() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/controls/ |
D | CustomIconCache.kt | 36 private val cache: MutableMap<String, Icon> = LinkedHashMap() constant in com.android.systemui.controls.CustomIconCache 49 synchronized(cache) { in store() 51 cache.put(controlId, icon) in store() 53 cache.remove(controlId) in store() 66 return synchronized(cache) { in retrieve() 67 cache.get(controlId) in retrieve() 72 synchronized(cache) { in clear() 73 cache.clear() in clear()
|
/frameworks/native/cmds/installd/ |
D | otapreopt.rc | 2 # into the dalvik-cache (relabeling them). 5 # The dalvik-cache was not moved itself, so as to restrict the rights of otapreopt_slot. 8 …/data/dalvik-cache/arm /data/dalvik-cache/arm64 /data/dalvik-cache/mips /data/dalvik-cache/mips64 …
|
D | otapreopt_slot.sh | 23 if test -d /data/ota/$SLOT_SUFFIX/dalvik-cache ; then 25 OLD_SIZE=$(du -h -s /data/dalvik-cache) 26 rm -rf /data/dalvik-cache/* 27 NEW_SIZE=$(du -h -s /data/ota/$SLOT_SUFFIX/dalvik-cache) 28 mv /data/ota/$SLOT_SUFFIX/dalvik-cache/* /data/dalvik-cache/ 29 rmdir /data/ota/$SLOT_SUFFIX/dalvik-cache
|
/frameworks/base/core/java/android/net/ |
D | SSLSessionCache.java | 59 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()
|
D | SSLCertificateSocketFactory.java | 144 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()
|
/frameworks/base/services/tests/uiservicestests/src/com/android/server/slice/ |
D | PackageMatchingCacheTest.java | 43 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()
|
/frameworks/base/libs/hwui/tests/unit/ |
D | ShaderCacheTests.cpp | 50 static void reinitializeAllFields(ShaderCache& cache) { in reinitializeAllFields() argument 52 std::lock_guard<std::mutex> lock(cache.mMutex); in reinitializeAllFields() 54 cache.mInitialized = newCache.mInitialized; in reinitializeAllFields() 55 cache.mBlobCache.reset(nullptr); in reinitializeAllFields() 56 cache.mFilename = newCache.mFilename; in reinitializeAllFields() 57 cache.mIDHash.clear(); in reinitializeAllFields() 58 cache.mSavePending = newCache.mSavePending; in reinitializeAllFields() 59 cache.mObservedBlobValueSize = newCache.mObservedBlobValueSize; in reinitializeAllFields() 60 cache.mDeferredSaveDelayMs = newCache.mDeferredSaveDelayMs; in reinitializeAllFields() 61 cache.mTryToStorePipelineCache = newCache.mTryToStorePipelineCache; in reinitializeAllFields() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/ |
D | NetworkTypeResIdCacheTest.kt | 31 private lateinit var cache: NetworkTypeResIdCache variable in com.android.systemui.statusbar.connectivity.NetworkTypeResIdCacheTest 36 cache = NetworkTypeResIdCache(overrides) in setUp() 41 assertThat(cache.get(group1, CARRIER_1, context)).isEqualTo(iconDefault1) in carrier1_noOverride_usesDefault() 49 assertThat(cache.get(group1, CARRIER_1, context)).isEqualTo(iconOverride1) in carrier1_overridden_usesOverride() 57 assertThat(cache.get(group1, CARRIER_2, context)).isEqualTo(iconDefault1) in carrier1_override_carrier2UsesDefault() 65 assertThat(cache.get(group2, CARRIER_1, context)).isEqualTo(iconDefault2) in carrier1_overrideType1_type2UsesDefault()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/wifi/ |
D | WifiRestrictionsCache.java | 58 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()
|
/frameworks/native/opengl/specs/ |
D | EGL_ANDROID_blob_cache.txt | 45 implementations may cache shader binaries after they are compiled. It may 47 program. The management of the cache is handled by the application (or 51 While the focus of this extension is on providing a persistent cache for 75 * cache. 83 * cache. 116 the cache and associates it with the given key. <get> points to a function 117 that retrieves from the cache the value associated with a given key. The 137 To insert a new binary value into the cache and associate it with a given 150 the cache after the set call. If a different value has been associated 153 guarantees, the cache implementation should attempt to cache the most [all …]
|
/frameworks/base/core/tests/coretests/src/android/view/accessibility/ |
D | AccessibilityInteractionClientTest.java | 101 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()
|
/frameworks/base/services/core/java/com/android/server/hdmi/ |
D | HdmiLogger.java | 112 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()
|
/frameworks/base/core/java/android/view/accessibility/ |
D | AccessibilityInteractionClient.java | 271 public static void setCache(int connectionId, AccessibilityCache cache) { in setCache() argument 273 sCaches.put(connectionId, cache); in setCache() 342 AccessibilityCache cache = getCache(connectionId); in getWindow() local 343 if (cache != null) { in getWindow() 345 window = cache.getWindow(accessibilityWindowId); in getWindow() 380 if (!bypassCache && cache != null) { in getWindow() 381 cache.addWindow(window); in getWindow() 423 AccessibilityCache cache = getCache(connectionId); in getWindowsOnAllDisplays() local 424 if (cache != null) { in getWindowsOnAllDisplays() 425 windows = cache.getWindowsOnAllDisplays(); in getWindowsOnAllDisplays() [all …]
|
/frameworks/base/location/java/android/location/ |
D | Location.java | 192 BearingDistanceCache cache = sBearingDistanceCache.get(); in distanceTo() local 194 if (mLatitudeDegrees != cache.mLat1 || mLongitudeDegrees != cache.mLon1 in distanceTo() 195 || dest.mLatitudeDegrees != cache.mLat2 || dest.mLongitudeDegrees != cache.mLon2) { in distanceTo() 197 dest.mLatitudeDegrees, dest.mLongitudeDegrees, cache); in distanceTo() 199 return cache.mDistance; in distanceTo() 212 BearingDistanceCache cache = sBearingDistanceCache.get(); in bearingTo() local 214 if (mLatitudeDegrees != cache.mLat1 || mLongitudeDegrees != cache.mLon1 in bearingTo() 215 || dest.mLatitudeDegrees != cache.mLat2 || dest.mLongitudeDegrees != cache.mLon2) { in bearingTo() 217 dest.mLatitudeDegrees, dest.mLongitudeDegrees, cache); in bearingTo() 219 return cache.mInitialBearing; in bearingTo() [all …]
|
/frameworks/av/media/libstagefright/renderfright/gl/ |
D | ProgramCache.cpp | 82 auto& cache = mCaches[context]; in primeCache() local 104 if (cache.count(shaderKey) == 0) { in primeCache() 105 cache.emplace(shaderKey, generateProgram(shaderKey)); in primeCache() 125 if (cache.count(shaderKey) == 0) { in primeCache() 126 cache.emplace(shaderKey, generateProgram(shaderKey)); in primeCache() 149 if (cache.count(shaderKey) == 0) { in primeCache() 150 cache.emplace(shaderKey, generateProgram(shaderKey)); in primeCache() 785 auto& cache = mCaches[context]; in useProgram() local 786 auto it = cache.find(needs); in useProgram() 787 if (it == cache.end()) { in useProgram() [all …]
|
/frameworks/compile/slang/tests/ |
D | slang_test.py | 143 if GetOutDir.cache is None: 146 GetOutDir.cache = os.environ['ANDROID_HOST_OUT'] 150 GetOutDir.cache = subprocess.check_output(['bash', '-c', 155 GetOutDir.cache = GetOutDir.cache.strip() 156 return GetOutDir.cache 161 GetOutDir.cache = None
|
/frameworks/native/libs/renderengine/gl/ |
D | ProgramCache.cpp | 82 auto& cache = mCaches[context]; in primeCache() local 104 if (cache.count(shaderKey) == 0) { in primeCache() 105 cache.emplace(shaderKey, generateProgram(shaderKey)); in primeCache() 125 if (cache.count(shaderKey) == 0) { in primeCache() 126 cache.emplace(shaderKey, generateProgram(shaderKey)); in primeCache() 149 if (cache.count(shaderKey) == 0) { in primeCache() 150 cache.emplace(shaderKey, generateProgram(shaderKey)); in primeCache() 808 auto& cache = mCaches[context]; in useProgram() local 809 auto it = cache.find(needs); in useProgram() 810 if (it == cache.end()) { in useProgram() [all …]
|
/frameworks/base/core/java/android/content/res/ |
D | ThemedResourceCache.java | 164 LongSparseArray<WeakReference<T>> cache = mThemedEntries.get(key); in getThemedLocked() local 165 if (cache == null && create) { in getThemedLocked() 166 cache = new LongSparseArray<>(1); in getThemedLocked() 169 mThemedEntries.put(keyClone, cache); in getThemedLocked() 172 return cache; in getThemedLocked()
|
/frameworks/base/core/tests/coretests/src/android/view/ |
D | BigCacheTest.java | 70 final Bitmap[] cache = new Bitmap[1]; in createCacheForView() local 76 cache[0] = view.getDrawingCache(); in createCacheForView() 80 return cache[0]; in createCacheForView()
|