Home
last modified time | relevance | path

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

123456

/frameworks/base/core/tests/coretests/src/android/util/
DLruCacheTest.java34 LruCache<String, String> cache = new LruCache<String, String>(3); in testStatistics() local
35 assertStatistics(cache); in testStatistics()
37 assertEquals(null, cache.put("a", "A")); in testStatistics()
39 assertStatistics(cache); in testStatistics()
40 assertHit(cache, "a", "A"); in testStatistics()
41 assertSnapshot(cache, "a", "A"); in testStatistics()
43 assertEquals(null, cache.put("b", "B")); in testStatistics()
45 assertStatistics(cache); in testStatistics()
46 assertHit(cache, "a", "A"); in testStatistics()
47 assertHit(cache, "b", "B"); in testStatistics()
[all …]
/frameworks/base/core/tests/coretests/src/android/content/pm/
DRegisteredServicesCacheTest.java76 TestServicesCache cache = new TestServicesCache(); in testGetAllServicesHappyPath() local
77 cache.addServiceForQuerying(U0, r1, newServiceInfo(t1, UID1)); in testGetAllServicesHappyPath()
78 cache.addServiceForQuerying(U0, r2, newServiceInfo(t2, UID2)); in testGetAllServicesHappyPath()
79 assertEquals(2, cache.getAllServicesSize(U0)); in testGetAllServicesHappyPath()
80 assertEquals(2, cache.getPersistentServicesSize(U0)); in testGetAllServicesHappyPath()
81 assertNotEmptyFileCreated(cache, U0); in testGetAllServicesHappyPath()
83 cache = new TestServicesCache(); in testGetAllServicesHappyPath()
84 assertEquals(2, cache.getPersistentServicesSize(U0)); in testGetAllServicesHappyPath()
88 TestServicesCache cache = new TestServicesCache(); in testGetAllServicesReplaceUid() local
89 cache.addServiceForQuerying(U0, r1, newServiceInfo(t1, UID1)); in testGetAllServicesReplaceUid()
[all …]
/frameworks/native/cmds/installd/
Dutils.cpp542 cache_t* cache = (cache_t*)calloc(1, sizeof(cache_t)); in start_cache_collection() local
543 return cache; in start_cache_collection()
548 static void* _cache_malloc(cache_t* cache, size_t len) in _cache_malloc() argument
561 if (cache->memBlocks == NULL) { in _cache_malloc()
563 cache->memBlocks = res; in _cache_malloc()
565 *(void**)res = *(void**)cache->memBlocks; in _cache_malloc()
566 *(void**)cache->memBlocks = res; in _cache_malloc()
570 int8_t* res = cache->curMemBlockAvail; in _cache_malloc()
572 if (cache->memBlocks == NULL || nextPos > cache->curMemBlockEnd) { in _cache_malloc()
578 *(void**)newBlock = cache->memBlocks; in _cache_malloc()
[all …]
Dotapreopt.rc2 # 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 …
Dotapreopt_slot.sh23 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/libs/hwui/tests/unit/
DGradientCacheTests.cpp28 GradientCache cache(extensions); in RENDERTHREAD_TEST() local
29 ASSERT_LT(1000u, cache.getMaxSize()) << "Expect non-trivial size"; in RENDERTHREAD_TEST()
33 Texture* texture = cache.get(colors, positions, 3); in RENDERTHREAD_TEST()
36 ASSERT_EQ((uint32_t) texture->objectSize(), cache.getSize()); in RENDERTHREAD_TEST()
37 ASSERT_TRUE(cache.getSize()); in RENDERTHREAD_TEST()
38 cache.clear(); in RENDERTHREAD_TEST()
39 ASSERT_EQ(cache.getSize(), 0u); in RENDERTHREAD_TEST()
DTextDropShadowCacheTests.cpp36 TextDropShadowCache cache(MB(5)); in RENDERTHREAD_TEST() local
37 cache.setFontRenderer(fontRenderer); in RENDERTHREAD_TEST()
47 ShadowTexture* texture = cache.get(&paint, glyphs.data(), glyphs.size(), 10, positions.data()); in RENDERTHREAD_TEST()
51 ASSERT_EQ((uint32_t) texture->objectSize(), cache.getSize()); in RENDERTHREAD_TEST()
52 ASSERT_TRUE(cache.getSize()); in RENDERTHREAD_TEST()
53 cache.clear(); in RENDERTHREAD_TEST()
54 ASSERT_EQ(cache.getSize(), 0u); in RENDERTHREAD_TEST()
/frameworks/base/core/java/android/net/
DSSLSessionCache.java57 public static void install(SSLSessionCache cache, SSLContext context) { in install() argument
61 cache == null ? null : cache.mSessionCache); in install()
74 public SSLSessionCache(Object cache) { in SSLSessionCache() argument
75 mSessionCache = (SSLClientSessionCache) cache; in SSLSessionCache()
98 SSLClientSessionCache cache = null; in SSLSessionCache() local
100 cache = FileClientSessionCache.usingDirectory(dir); in SSLSessionCache()
104 mSessionCache = cache; in SSLSessionCache()
DSSLCertificateSocketFactory.java103 int handshakeTimeoutMillis, SSLSessionCache cache, boolean secure) { in SSLCertificateSocketFactory() argument
105 mSessionCache = cache == null ? null : cache.mSessionCache; in SSLCertificateSocketFactory()
129 public static SSLSocketFactory getDefault(int handshakeTimeoutMillis, SSLSessionCache cache) { in getDefault() argument
130 return new SSLCertificateSocketFactory(handshakeTimeoutMillis, cache, true); in getDefault()
145 public static SSLSocketFactory getInsecure(int handshakeTimeoutMillis, SSLSessionCache cache) { in getInsecure() argument
146 return new SSLCertificateSocketFactory(handshakeTimeoutMillis, cache, false); in getInsecure()
167 int handshakeTimeoutMillis, SSLSessionCache cache) { in getHttpSocketFactory() argument
169 new SSLCertificateSocketFactory(handshakeTimeoutMillis, cache, true)); in getHttpSocketFactory()
/frameworks/base/docs/html/training/displaying-bitmaps/
Dcache-bitmap.jd14 <li><a href="#memory-cache">Use a Memory Cache</a></li>
15 <li><a href="#disk-cache">Use a Disk Cache</a></li>
44 and disk cache can often help here, allowing components to quickly reload processed images.</p>
46 <p>This lesson walks you through using a memory and disk bitmap cache to improve the responsiveness
49 <h2 id="memory-cache">Use a Memory Cache</h2>
51 <p>A memory cache offers fast access to bitmaps at the cost of taking up valuable application
56 recently used member before the cache exceeds its designated size.</p>
58 <p class="note"><strong>Note:</strong> In the past, a popular memory cache implementation was a
59 {@link java.lang.ref.SoftReference} or {@link java.lang.ref.WeakReference} bitmap cache, however
75 larger cache to hold the same number of images in memory compared to a device like <a
[all …]
/frameworks/base/docs/html/training/efficient-downloads/
Dredundant_redundant.jd19 <li><a href="#ResponseCache">Use the HttpURLConnection response cache</a></li>
36cache static resources, including on-demand downloads such as full size images, for as long as rea…
55 <p>Using this approach, you can also effectively cache dynamic content while ensuring it doesn't re…
57 <p>You can cache non-sensitive data in the unmanaged external cache directory:</p>
61 <p>Alternatively, you can use the managed / secure application cache. Note that this internal cache
65 <p>Files stored in either cache location will be erased when the application is uninstalled.</p>
69 <p>Android 4.0 added a response cache to {@code HttpURLConnection}. You can enable HTTP response ca…
79 Log.d(TAG, "HTTP response cache is unavailable.");
83 <p>This sample code will turn on the response cache on Android 4.0+ devices without affecting earli…
85 <p>With the cache installed, fully cached HTTP requests can be served directly from local storage, …
[all …]
/frameworks/native/opengl/specs/
DEGL_ANDROID_blob_cache.txt45 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/location/java/android/location/
DLocation.java434 BearingDistanceCache cache = sBearingDistanceCache.get(); in distanceBetween() local
436 endLatitude, endLongitude, cache); in distanceBetween()
437 results[0] = cache.mDistance; in distanceBetween()
439 results[1] = cache.mInitialBearing; in distanceBetween()
441 results[2] = cache.mFinalBearing; in distanceBetween()
455 BearingDistanceCache cache = sBearingDistanceCache.get(); in distanceTo() local
457 if (mLatitude != cache.mLat1 || mLongitude != cache.mLon1 || in distanceTo()
458 dest.mLatitude != cache.mLat2 || dest.mLongitude != cache.mLon2) { in distanceTo()
460 dest.mLatitude, dest.mLongitude, cache); in distanceTo()
462 return cache.mDistance; in distanceTo()
[all …]
/frameworks/base/services/core/java/com/android/server/hdmi/
DHdmiLogger.java110 private static String updateLog(HashMap<String, Pair<Long, Integer>> cache, String logMessage) { in updateLog() argument
112 Pair<Long, Integer> timing = cache.get(logMessage); in updateLog()
115 cache.put(logMessage, new Pair<>(curTime, 1)); in updateLog()
118 increaseLogCount(cache, logMessage); in updateLog()
129 private static void increaseLogCount(HashMap<String, Pair<Long, Integer>> cache, in increaseLogCount() argument
131 Pair<Long, Integer> timing = cache.get(message); in increaseLogCount()
133 cache.put(message, new Pair<>(timing.first, timing.second + 1)); in increaseLogCount()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DAnqpCacheTest.java134 AnqpCache cache = mCache = new AnqpCache(mClock); in basicAddQueryAndExpiry() local
144 cache.initiate(scanDetail.getNetworkDetail(), queryList); in basicAddQueryAndExpiry()
149 ANQPData data = cache.getEntry(scanDetail.getNetworkDetail()); in basicAddQueryAndExpiry()
159 cache.update(scanDetail.getNetworkDetail(), anqpResults); in basicAddQueryAndExpiry()
166 ANQPData data = cache.getEntry(scanDetail.getNetworkDetail()); in basicAddQueryAndExpiry()
178 cache.initiate(scanDetail.getNetworkDetail(), queryList); in basicAddQueryAndExpiry()
185 cache.update(scanDetail.getNetworkDetail(), anqpResults); in basicAddQueryAndExpiry()
192 ANQPData data = cache.getEntry(scanDetail.getNetworkDetail()); in basicAddQueryAndExpiry()
197 ANQPData data = cache.getEntry(scanDetail.getNetworkDetail()); in basicAddQueryAndExpiry()
/frameworks/av/media/libstagefright/codecs/aacenc/src/
Dbitbuffer.c42 hBitBuf->cache = 0; in CreateBitBuffer()
85 hBitBuf->cache = 0; in ResetBitBuf()
134 writeValue |= hBitBuf->cache; in WriteBits()
147 hBitBuf->cache = writeValue; in WriteBits()
/frameworks/volley/src/main/java/com/android/volley/
DRequestQueue.java108 public RequestQueue(Cache cache, Network network, int threadPoolSize, in RequestQueue() argument
110 mCache = cache; in RequestQueue()
123 public RequestQueue(Cache cache, Network network, int threadPoolSize) { in RequestQueue() argument
124 this(cache, network, threadPoolSize, in RequestQueue()
134 public RequestQueue(Cache cache, Network network) { in RequestQueue() argument
135 this(cache, network, DEFAULT_NETWORK_THREAD_POOL_SIZE); in RequestQueue()
/frameworks/base/core/java/android/content/res/
DThemedResourceCache.java161 LongSparseArray<WeakReference<T>> cache = mThemedEntries.get(key); in getThemedLocked() local
162 if (cache == null && create) { in getThemedLocked()
163 cache = new LongSparseArray<>(1); in getThemedLocked()
166 mThemedEntries.put(keyClone, cache); in getThemedLocked()
169 return cache; in getThemedLocked()
/frameworks/minikin/libs/minikin/
DHbFontCache.cpp82 static HbFontCache* cache = nullptr; in getFontCacheLocked() local
83 if (cache == nullptr) { in getFontCacheLocked()
84 cache = new HbFontCache(); in getFontCacheLocked()
86 return cache; in getFontCacheLocked()
/frameworks/base/core/tests/coretests/src/android/view/
DBigCacheTest.java72 final Bitmap[] cache = new Bitmap[1]; in createCacheForView() local
78 cache[0] = view.getDrawingCache(); in createCacheForView()
82 return cache[0]; in createCacheForView()
DZeroSizedTest.java90 final Bitmap[] cache = new Bitmap[1]; in createCacheForView() local
96 cache[0] = view.getDrawingCache(); in createCacheForView()
100 return cache[0]; in createCacheForView()
/frameworks/base/docs/html/training/volley/
Drequestqueue.jd39 of the requests, and a cache to handle caching. There are standard implementations of these
41 cache with an in-memory index, and {@code BasicNetwork} provides a network transport based
54 // Instantiate the cache
55 Cache cache = new DiskBasedCache(getCacheDir(), 1024 * 1024); // 1MB cap
60 // Instantiate the RequestQueue with the cache and network.
61 mRequestQueue = new RequestQueue(cache, network);
131 cache = new LruCache&lt;String, Bitmap&gt;(20);
135 return cache.get(url);
140 cache.put(url, bitmap);
/frameworks/base/libs/hwui/font/
DFontUtil.h44 #define GET_METRICS(cache, glyph) cache->getGlyphIDMetrics(glyph) argument
/frameworks/compile/libbcc/
DREADME.rst31 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/opt/bitmap/src/com/android/bitmap/drawable/
DCircularBitmapDrawable.java49 BitmapCache cache, boolean limitDensity) { in CircularBitmapDrawable() argument
50 this(res, cache, limitDensity, null); in CircularBitmapDrawable()
54 BitmapCache cache, boolean limitDensity, ExtendedOptions opts) { in CircularBitmapDrawable() argument
55 super(res, cache, limitDensity, opts); in CircularBitmapDrawable()

123456