Searched refs:cache (Results 1 - 25 of 74) sorted by relevance

123

/frameworks/base/core/tests/coretests/src/android/util/
H A DLruCacheTest.java34 LruCache<String, String> cache = new LruCache<String, String>(3);
35 assertStatistics(cache);
37 assertEquals(null, cache.put("a", "A"));
39 assertStatistics(cache);
40 assertHit(cache, "a", "A");
41 assertSnapshot(cache, "a", "A");
43 assertEquals(null, cache.put("b", "B"));
45 assertStatistics(cache);
46 assertHit(cache, "a", "A");
47 assertHit(cache, "
467 assertHit(LruCache<String, String> cache, String key, String value) argument
473 assertMiss(LruCache<String, String> cache, String key) argument
479 assertCreated(LruCache<String, String> cache, String key, String value) argument
486 assertStatistics(LruCache<?, ?> cache) argument
494 assertSnapshot(LruCache<T, T> cache, T... keysAndValues) argument
[all...]
/frameworks/base/libs/hwui/tests/unit/
H A DGradientCacheTests.cpp28 GradientCache cache(extensions);
29 ASSERT_LT(1000u, cache.getMaxSize()) << "Expect non-trivial size";
33 Texture* texture = cache.get(colors, positions, 3);
36 ASSERT_EQ((uint32_t) texture->objectSize(), cache.getSize());
37 ASSERT_TRUE(cache.getSize());
38 cache.clear();
39 ASSERT_EQ(cache.getSize(), 0u);
H A DTextDropShadowCacheTests.cpp36 TextDropShadowCache cache(MB(5));
37 cache.setFontRenderer(fontRenderer);
47 ShadowTexture* texture = cache.get(&paint, glyphs.data(), glyphs.size(), 10, positions.data());
51 ASSERT_EQ((uint32_t) texture->objectSize(), cache.getSize());
52 ASSERT_TRUE(cache.getSize());
53 cache.clear();
54 ASSERT_EQ(cache.getSize(), 0u);
/frameworks/native/cmds/installd/
H A 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
H A Dutils.cpp542 cache_t* cache = (cache_t*)calloc(1, sizeof(cache_t)); local
543 return cache;
548 static void* _cache_malloc(cache_t* cache, size_t len) argument
559 CACHE_NOISY(ALOGI("Allocated large cache mem block: %p size %zu", res, len));
561 if (cache->memBlocks == NULL) {
563 cache->memBlocks = res;
565 *(void**)res = *(void**)cache->memBlocks;
566 *(void**)cache->memBlocks = res;
570 int8_t* res = cache->curMemBlockAvail;
572 if (cache
590 _cache_realloc(cache_t* cache, void* cur, size_t origLen, size_t len) argument
600 _inc_num_cache_collected(cache_t* cache) argument
609 _add_cache_dir_t(cache_t* cache, cache_dir_t* parent, const char *name) argument
642 _add_cache_file_t(cache_t* cache, cache_dir_t* dir, time_t modTime, const char *name) argument
674 _add_cache_files(cache_t *cache, cache_dir_t *parentDir, const char *dirName, DIR* dir, char *pathBase, char *pathPos, size_t pathAvailLen) argument
880 add_cache_files(cache_t* cache, const std::string& data_path) argument
977 clear_cache_files(const std::string& data_path, cache_t* cache, int64_t free_size) argument
1020 finish_cache_collection(cache_t* cache) argument
[all...]
/frameworks/base/core/tests/coretests/src/android/content/pm/
H A DRegisteredServicesCacheTest.java76 TestServicesCache cache = new TestServicesCache();
77 cache.addServiceForQuerying(U0, r1, newServiceInfo(t1, UID1));
78 cache.addServiceForQuerying(U0, r2, newServiceInfo(t2, UID2));
79 assertEquals(2, cache.getAllServicesSize(U0));
80 assertEquals(2, cache.getPersistentServicesSize(U0));
81 assertNotEmptyFileCreated(cache, U0);
83 cache = new TestServicesCache();
84 assertEquals(2, cache.getPersistentServicesSize(U0));
88 TestServicesCache cache = new TestServicesCache();
89 cache
197 assertNotEmptyFileCreated(TestServicesCache cache, int userId) argument
[all...]
/frameworks/base/core/java/android/net/
H A DSSLSessionCache.java33 * File-based cache of established SSL sessions. When re-establishing a
34 * connection to the same server, using an SSL session cache can save some time,
36 * This is a persistent cache which can span executions of the application.
45 * Installs a {@link SSLSessionCache} on a {@link SSLContext}. The cache will
49 * @param cache the cache instance to install, or {@code null} to uninstall any
50 * existing cache.
53 * cache.
57 public static void install(SSLSessionCache cache, SSLContext context) { argument
61 cache
74 SSLSessionCache(Object cache) argument
[all...]
H A DSSLCertificateSocketFactory.java103 int handshakeTimeoutMillis, SSLSessionCache cache, boolean secure) {
105 mSessionCache = cache == null ? null : cache.mSessionCache;
122 * and SSL session cache.
126 * @param cache The {@link SSLSessionCache} to use, or null for no cache.
129 public static SSLSocketFactory getDefault(int handshakeTimeoutMillis, SSLSessionCache cache) { argument
130 return new SSLCertificateSocketFactory(handshakeTimeoutMillis, cache, true);
135 * disabled, using an optional handshake timeout and SSL session cache.
142 * @param cache Th
102 SSLCertificateSocketFactory( int handshakeTimeoutMillis, SSLSessionCache cache, boolean secure) argument
145 getInsecure(int handshakeTimeoutMillis, SSLSessionCache cache) argument
166 getHttpSocketFactory( int handshakeTimeoutMillis, SSLSessionCache cache) argument
[all...]
/frameworks/base/libs/hwui/font/
H A DFontUtil.h44 #define GET_METRICS(cache, glyph) cache->getGlyphIDMetrics(glyph)
/frameworks/av/media/libstagefright/codecs/aacenc/src/
H A Dbitbuffer.c42 hBitBuf->cache = 0;
85 hBitBuf->cache = 0;
134 writeValue |= hBitBuf->cache;
147 hBitBuf->cache = writeValue;
/frameworks/base/tools/layoutlib/bridge/src/android/os/
H A DServiceManager.java68 * @param cache the cache of service references
71 public static void initServiceCache(Map<String, IBinder> cache) { argument
/frameworks/volley/src/main/java/com/android/volley/toolbox/
H A DClearCacheRequest.java28 * A synthetic request used for clearing the cache.
35 * Creates a synthetic request for clearing the cache.
36 * @param cache Cache to clear
37 * @param callback Callback to make on the main thread once the cache is clear,
40 public ClearCacheRequest(Cache cache, Runnable callback) { argument
42 mCache = cache;
/frameworks/base/core/tests/coretests/src/android/view/
H A DBigCacheTest.java29 * Builds the drawing cache of two Views, one smaller than the maximum cache size,
30 * one larger than the maximum cache size. The latter should always have a null
31 * drawing cache.
72 final Bitmap[] cache = new Bitmap[1];
78 cache[0] = view.getDrawingCache();
82 return cache[0];
H A DZeroSizedTest.java28 * Builds the drawing cache of Views of various dimension. The assumption is that
30 * drawing cache.
90 final Bitmap[] cache = new Bitmap[1];
96 cache[0] = view.getDrawingCache();
100 return cache[0];
/frameworks/base/services/core/java/com/android/server/hdmi/
H A DHdmiLogger.java110 private static String updateLog(HashMap<String, Pair<Long, Integer>> cache, String logMessage) { argument
112 Pair<Long, Integer> timing = cache.get(logMessage);
115 cache.put(logMessage, new Pair<>(curTime, 1));
118 increaseLogCount(cache, logMessage);
129 private static void increaseLogCount(HashMap<String, Pair<Long, Integer>> cache, argument
131 Pair<Long, Integer> timing = cache.get(message);
133 cache.put(message, new Pair<>(timing.first, timing.second + 1));
/frameworks/minikin/libs/minikin/
H A DHbFontCache.cpp82 static HbFontCache* cache = nullptr; local
83 if (cache == nullptr) {
84 cache = new HbFontCache();
86 return cache;
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
H A DAnqpCacheTest.java134 AnqpCache cache = mCache = new AnqpCache(mClock);
144 cache.initiate(scanDetail.getNetworkDetail(), queryList);
149 ANQPData data = cache.getEntry(scanDetail.getNetworkDetail());
159 cache.update(scanDetail.getNetworkDetail(), anqpResults);
166 ANQPData data = cache.getEntry(scanDetail.getNetworkDetail());
178 cache.initiate(scanDetail.getNetworkDetail(), queryList);
185 cache.update(scanDetail.getNetworkDetail(), anqpResults);
192 ANQPData data = cache.getEntry(scanDetail.getNetworkDetail());
197 ANQPData data = cache.getEntry(scanDetail.getNetworkDetail());
/frameworks/base/core/java/android/database/sqlite/
H A DSQLiteDebug.java97 /** the number of bytes of page cache allocation which could not be sattisfied by the
101 * that overflowed because no space was left in the page cache.
133 /** statement cache stats: hits/misses/cachesize */
134 public String cache; field in class:SQLiteDebug.DbStats
142 this.cache = hits + "/" + misses + "/" + cachesize;
/frameworks/base/core/java/android/content/res/
H A DThemedResourceCache.java32 * @param <T> type of data to cache
40 * Adds a new theme-dependent entry to the cache.
45 * @param entry the entry to cache
52 * Adds a new entry to the cache.
57 * @param entry the entry to cache
80 * Returns an entry from the cache.
84 * @return a cached entry, or {@code null} if not in the cache
91 // probably going to be the themed cache.
114 * Prunes cache entries that have been invalidated by a configuration
140 * @return the cached data for the theme, or {@code null} if the cache i
[all...]
/frameworks/base/location/java/android/location/
H A DLocation.java434 BearingDistanceCache cache = sBearingDistanceCache.get();
436 endLatitude, endLongitude, cache);
437 results[0] = cache.mDistance;
439 results[1] = cache.mInitialBearing;
441 results[2] = cache.mFinalBearing;
455 BearingDistanceCache cache = sBearingDistanceCache.get();
457 if (mLatitude != cache.mLat1 || mLongitude != cache.mLon1 ||
458 dest.mLatitude != cache.mLat2 || dest.mLongitude != cache
[all...]
/frameworks/av/media/libstagefright/codecs/aacenc/inc/
H A Dbitbuffer.h53 UWord32 cache; member in struct:BIT_BUF
/frameworks/native/include/binder/
H A DPermissionCache.h33 * Currently the cache is not updated when there is a permission change,
37 * to cache. This restriction may be lifted at a later time.
54 // this is our cache per say. it stores pooled names.
57 // free the whole cache, but keep the permission name pool
63 void cache(const String16& permission, uid_t uid, bool granted);
/frameworks/opt/bitmap/src/com/android/bitmap/drawable/
H A DCircularBitmapDrawable.java49 BitmapCache cache, boolean limitDensity) {
50 this(res, cache, limitDensity, null);
54 BitmapCache cache, boolean limitDensity, ExtendedOptions opts) {
55 super(res, cache, limitDensity, opts);
48 CircularBitmapDrawable(Resources res, BitmapCache cache, boolean limitDensity) argument
53 CircularBitmapDrawable(Resources res, BitmapCache cache, boolean limitDensity, ExtendedOptions opts) argument
/frameworks/base/cmds/uiautomator/cmds/uiautomator/
H A Duiautomator19 # * Use an alternative dalvik cache when running as non-root. Jar file needs
22 # cache so we redirect to an alternative cache
37 # if not running as root, trick dalvik into using an alternative dex cache
39 tmp_cache=${run_base}/dalvik-cache
/frameworks/base/core/java/android/os/
H A DServiceManager.java132 * @param cache the cache of service references
135 public static void initServiceCache(Map<String, IBinder> cache) { argument
139 sCache.putAll(cache);

Completed in 3182 milliseconds

123