/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/systemproperties/src/android/os/ |
D | PropertyInvalidatedCacheTest.java | 57 TestCache cache = new TestCache(); in testCacheRecompute() local 58 cache.invalidateCache(); in testCacheRecompute() 59 assertEquals("foo5", cache.query(5)); in testCacheRecompute() 60 assertEquals(1, cache.getRecomputeCount()); in testCacheRecompute() 61 assertEquals("foo5", cache.query(5)); in testCacheRecompute() 62 assertEquals(1, cache.getRecomputeCount()); in testCacheRecompute() 63 assertEquals("foo6", cache.query(6)); in testCacheRecompute() 64 assertEquals(2, cache.getRecomputeCount()); in testCacheRecompute() 65 cache.invalidateCache(); in testCacheRecompute() 66 assertEquals("foo5", cache.query(5)); in testCacheRecompute() [all …]
|
/frameworks/base/core/tests/coretests/src/android/content/pm/ |
D | RegisteredServicesCacheTest.java | 79 TestServicesCache cache = new TestServicesCache(); in testGetAllServicesHappyPath() local 80 cache.addServiceForQuerying(U0, r1, newServiceInfo(t1, UID1)); in testGetAllServicesHappyPath() 81 cache.addServiceForQuerying(U0, r2, newServiceInfo(t2, UID2)); in testGetAllServicesHappyPath() 82 assertEquals(2, cache.getAllServicesSize(U0)); in testGetAllServicesHappyPath() 83 assertEquals(2, cache.getPersistentServicesSize(U0)); in testGetAllServicesHappyPath() 84 assertNotEmptyFileCreated(cache, U0); in testGetAllServicesHappyPath() 86 cache = new TestServicesCache(); in testGetAllServicesHappyPath() 87 assertEquals(2, cache.getPersistentServicesSize(U0)); in testGetAllServicesHappyPath() 91 TestServicesCache cache = new TestServicesCache(); in testGetAllServicesReplaceUid() local 92 cache.addServiceForQuerying(U0, r1, newServiceInfo(t1, UID1)); in testGetAllServicesReplaceUid() [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/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/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/location/java/android/location/ |
D | Location.java | 470 BearingDistanceCache cache = sBearingDistanceCache.get(); in distanceBetween() local 472 endLatitude, endLongitude, cache); in distanceBetween() 473 results[0] = cache.mDistance; in distanceBetween() 475 results[1] = cache.mInitialBearing; in distanceBetween() 477 results[2] = cache.mFinalBearing; in distanceBetween() 491 BearingDistanceCache cache = sBearingDistanceCache.get(); in distanceTo() local 493 if (mLatitude != cache.mLat1 || mLongitude != cache.mLon1 || in distanceTo() 494 dest.mLatitude != cache.mLat2 || dest.mLongitude != cache.mLon2) { in distanceTo() 496 dest.mLatitude, dest.mLongitude, cache); in distanceTo() 498 return cache.mDistance; in distanceTo() [all …]
|
/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() 778 auto& cache = mCaches[context]; in useProgram() local 779 auto it = cache.find(needs); in useProgram() 780 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/base/libs/hwui/tests/unit/ |
D | ShaderCacheTests.cpp | 41 static void setSaveDelay(ShaderCache& cache, unsigned int saveDelay) { in setSaveDelay() argument 42 cache.mDeferredSaveDelay = saveDelay; in setSaveDelay() 49 static void terminate(ShaderCache& cache, bool saveContent) { in terminate() argument 50 std::lock_guard<std::mutex> lock(cache.mMutex); in terminate() 51 cache.mSavePending = saveContent; in terminate() 52 cache.saveToDiskLocked(); in terminate() 53 cache.mBlobCache = NULL; in terminate() 60 static bool validateCache(ShaderCache& cache, std::vector<T> hash) { in validateCache() argument 61 return cache.validateCache(hash.data(), hash.size() * sizeof(T)); in validateCache()
|
/frameworks/base/cmds/statsd/src/condition/ |
D | ConditionWizard.cpp | 26 vector<ConditionState> cache(mAllConditions.size(), ConditionState::kNotEvaluated); in query() local 30 cache); in query() 31 return cache[index]; in query()
|
/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/tools/bit/ |
D | make.cpp | 101 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()
|
/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()
|
D | ZeroSizedTest.java | 89 final Bitmap[] cache = new Bitmap[1]; in createCacheForView() local 95 cache[0] = view.getDrawingCache(); in createCacheForView() 99 return cache[0]; in createCacheForView()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/attention/ |
D | AttentionManagerServiceTest.java | 164 AttentionCheckCache cache = new AttentionCheckCache(0, 0, 2L); in testAttentionCheckCacheBuffer_getLast_returnTheLastElement() local 165 buffer.add(cache); in testAttentionCheckCacheBuffer_getLast_returnTheLastElement() 166 assertThat(buffer.getLast()).isEqualTo(cache); in testAttentionCheckCacheBuffer_getLast_returnTheLastElement() 178 AttentionCheckCache cache = new AttentionCheckCache(0L, 0, 1L); in testAttentionCheckCacheBuffer_get_handleCircularIndexing() local 182 buffer.add(cache); in testAttentionCheckCacheBuffer_get_handleCircularIndexing() 188 assertThat(buffer.get(0)).isEqualTo(cache); in testAttentionCheckCacheBuffer_get_handleCircularIndexing()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/wifi/ |
D | AccessPointPreference.java | 102 public AccessPointPreference(AccessPoint accessPoint, Context context, UserBadgeCache cache, in AccessPointPreference() argument 104 this(accessPoint, context, cache, 0 /* iconResId */, forSavedNetworks); in AccessPointPreference() 108 public AccessPointPreference(AccessPoint accessPoint, Context context, UserBadgeCache cache, in AccessPointPreference() argument 110 this(accessPoint, context, cache, iconResId, forSavedNetworks, in AccessPointPreference() 115 AccessPointPreference(AccessPoint accessPoint, Context context, UserBadgeCache cache, in AccessPointPreference() argument 121 mBadgeCache = cache; in AccessPointPreference()
|
/frameworks/base/graphics/java/android/graphics/fonts/ |
D | SystemFonts.java | 114 @NonNull Map<String, ByteBuffer> cache, in pushFamilyToFallback() argument 139 xmlFamily.getName(), defaultFonts, languageTags, variant, cache, availableFonts); in pushFamilyToFallback() 151 xmlFamily.getName(), fallback, languageTags, variant, cache, in pushFamilyToFallback() 168 @NonNull Map<String, ByteBuffer> cache, in createFontFamily() argument 178 ByteBuffer buffer = cache.get(fullPath); in createFontFamily() 180 if (cache.containsKey(fullPath)) { in createFontFamily() 184 cache.put(fullPath, buffer); in createFontFamily()
|