/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/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 | 473 BearingDistanceCache cache = sBearingDistanceCache.get(); in distanceBetween() local 475 endLatitude, endLongitude, cache); in distanceBetween() 476 results[0] = cache.mDistance; in distanceBetween() 478 results[1] = cache.mInitialBearing; in distanceBetween() 480 results[2] = cache.mFinalBearing; in distanceBetween() 494 BearingDistanceCache cache = sBearingDistanceCache.get(); in distanceTo() local 496 if (mLatitude != cache.mLat1 || mLongitude != cache.mLon1 || in distanceTo() 497 dest.mLatitude != cache.mLat2 || dest.mLongitude != cache.mLon2) { in distanceTo() 499 dest.mLatitude, dest.mLongitude, cache); in distanceTo() 501 return cache.mDistance; in distanceTo() [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/native/libs/renderengine/gl/ |
D | ProgramCache.cpp | 81 auto& cache = mCaches[context]; in primeCache() local 96 if (cache.count(shaderKey) == 0) { in primeCache() 97 cache.emplace(shaderKey, generateProgram(shaderKey)); in primeCache() 120 if (cache.count(shaderKey) == 0) { in primeCache() 121 cache.emplace(shaderKey, generateProgram(shaderKey)); in primeCache() 715 auto& cache = mCaches[context]; in useProgram() local 716 auto it = cache.find(needs); in useProgram() 717 if (it == cache.end()) { in useProgram() 720 it = cache.emplace(needs, generateProgram(needs)).first; in useProgram() 724 context, needs.mKey, uint32_t(ns2ms(time)), cache.size()); in useProgram()
|
/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/cmds/statsd/src/condition/ |
D | ConditionWizard.cpp | 29 vector<ConditionState> cache(mAllConditions.size(), ConditionState::kNotEvaluated); in query() local 33 cache, *dimensionKeySet); in query() 34 return cache[index]; in query()
|
/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/packages/SettingsLib/Tile/src/com/android/settingslib/drawer/ |
D | TileUtils.java | 211 Map<Pair<String, String>, Tile> cache) { in getCategories() argument 221 getTilesForAction(context, user, SETTINGS_ACTION, cache, null, tiles, true); in getCategories() 222 getTilesForAction(context, user, OPERATOR_SETTINGS, cache, in getCategories() 224 getTilesForAction(context, user, MANUFACTURER_SETTINGS, cache, in getCategories() 228 getTilesForAction(context, user, EXTRA_SETTINGS_ACTION, cache, null, tiles, false); in getCategories() 229 getTilesForAction(context, user, IA_SETTINGS_ACTION, cache, null, tiles, false); in getCategories()
|
/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 | 115 @NonNull Map<String, ByteBuffer> cache, in pushFamilyToFallback() argument 140 xmlFamily.getName(), defaultFonts, languageTags, variant, cache, availableFonts); in pushFamilyToFallback() 152 xmlFamily.getName(), fallback, languageTags, variant, cache, in pushFamilyToFallback() 169 @NonNull Map<String, ByteBuffer> cache, in createFontFamily() argument 179 ByteBuffer buffer = cache.get(fullPath); in createFontFamily() 181 if (cache.containsKey(fullPath)) { in createFontFamily() 185 cache.put(fullPath, buffer); in createFontFamily()
|
/frameworks/compile/libbcc/ |
D | README.rst | 31 cache file. Note that the compilation is triggered by a cache 33 * load from the cache file upon cache-hit. 100 just-in-time compilation or cache loading 135 A cache file (denoted as \*.oBCC) for libbcc consists of several sections: 141 * **Header** (MCO_Header) - The header of a cache file. It contains the 145 to be at the beginning of the cache file. 148 length strings. The strp_index in the other part of the cache file
|
/frameworks/base/core/jni/ |
D | android_hardware_camera2_CameraMetadata.cpp | 682 sp<VendorTagDescriptorCache> cache = VendorTagDescriptorCache::getGlobalVendorTagCache(); in CameraMetadata_getTagFromKeyLocal() local 683 if (cache.get()) { in CameraMetadata_getTagFromKeyLocal() 687 cache->getVendorTagDescriptor(vendorId, &vTags); in CameraMetadata_getTagFromKeyLocal() 704 sp<VendorTagDescriptorCache> cache = VendorTagDescriptorCache::getGlobalVendorTagCache(); in CameraMetadata_getAllVendorKeys() local 705 if (cache.get() == nullptr) { in CameraMetadata_getAllVendorKeys() 715 cache->getVendorTagDescriptor(vendorId, &vTags); in CameraMetadata_getAllVendorKeys() 828 sp<VendorTagDescriptorCache> cache = VendorTagDescriptorCache::getGlobalVendorTagCache(); in CameraMetadata_getTagFromKey() local 829 if (cache.get() != nullptr) { in CameraMetadata_getTagFromKey() 830 cache->getVendorTagDescriptor(vendorId, &vTags); in CameraMetadata_getTagFromKey() 880 sp<VendorTagDescriptorCache> cache = new VendorTagDescriptorCache(); in CameraMetadata_setupGlobalVendorTagDescriptor() local [all …]
|