Searched refs:cache (Results 1 - 25 of 53) 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/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
158 getHttpSocketFactory( int handshakeTimeoutMillis, SSLSessionCache cache) argument
[all...]
/frameworks/base/libs/hwui/font/
H A DFontUtil.h43 #define GET_METRICS(cache, glyph) cache->getGlyphIDMetrics(glyph)
56 #define GET_METRICS(cache, glyph) cache->getUnicharMetrics(glyph)
/frameworks/base/core/tests/coretests/src/android/net/http/
H A DHttpResponseCacheTest.java87 HttpResponseCache cache = HttpResponseCache.install(cacheDir, 10 * 1024 * 1024);
88 cache.close();
90 cache.flush();
97 HttpResponseCache cache = HttpResponseCache.install(cacheDir, 10 * 1024 * 1024);
98 cache.close();
103 HttpResponseCache cache = HttpResponseCache.install(cacheDir, 10 * 1024 * 1024);
104 cache.delete();
113 HttpResponseCache cache = HttpResponseCache.install(cacheDir, 10 * 1024 * 1024);
122 assertEquals(1, cache.getRequestCount());
123 assertEquals(1, cache
[all...]
/frameworks/native/cmds/installd/
H A Dutils.c488 cache_t* cache = (cache_t*)calloc(1, sizeof(cache_t)); local
489 return cache;
494 static void* _cache_malloc(cache_t* cache, size_t len) argument
505 CACHE_NOISY(ALOGI("Allocated large cache mem block: %p size %d", res, len));
507 if (cache->memBlocks == NULL) {
509 cache->memBlocks = res;
511 *(void**)res = *(void**)cache->memBlocks;
512 *(void**)cache->memBlocks = res;
516 int8_t* res = cache->curMemBlockAvail;
518 if (cache
536 _cache_realloc(cache_t* cache, void* cur, size_t origLen, size_t len) argument
546 _inc_num_cache_collected(cache_t* cache) argument
555 _add_cache_dir_t(cache_t* cache, cache_dir_t* parent, const char *name) argument
588 _add_cache_file_t(cache_t* cache, cache_dir_t* dir, time_t modTime, const char *name) argument
620 _add_cache_files(cache_t *cache, cache_dir_t *parentDir, const char *dirName, DIR* dir, char *pathBase, char *pathPos, size_t pathAvailLen) argument
733 add_cache_files(cache_t* cache, const char *basepath, const char *cachedir) argument
839 clear_cache_files(cache_t* cache, int64_t free_size) argument
882 finish_cache_collection(cache_t* cache) argument
[all...]
/frameworks/base/tools/layoutlib/bridge/src/android/os/
H A DServiceManager.java66 * @param cache the cache of service references
69 public static void initServiceCache(Map<String, IBinder> cache) { argument
/frameworks/volley/src/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/av/media/libstagefright/codecs/aacenc/src/
H A Dbitbuffer.c65 hBitBuf->cache = 0;
108 hBitBuf->cache = 0;
157 writeValue |= hBitBuf->cache;
170 hBitBuf->cache = writeValue;
/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.java108 private static String updateLog(HashMap<String, Pair<Long, Integer>> cache, String logMessage) { argument
110 Pair<Long, Integer> timing = cache.get(logMessage);
113 cache.put(logMessage, new Pair<>(curTime, 1));
116 increaseLogCount(cache, logMessage);
127 private static void increaseLogCount(HashMap<String, Pair<Long, Integer>> cache, argument
129 Pair<Long, Integer> timing = cache.get(message);
131 cache.put(message, new Pair<>(timing.first, timing.second + 1));
/frameworks/volley/src/com/android/volley/
H A DRequestQueue.java35 * resolving from either cache or network on a worker thread, and then delivering
47 * <li>containsKey(cacheKey) indicates that there is a request in flight for the given cache
49 * <li>get(cacheKey) returns waiting requests for the given cache key. The in flight request
63 /** The cache triage queue. */
86 /** The cache dispatcher. */
92 * @param cache A Cache to use for persisting responses to disk
97 public RequestQueue(Cache cache, Network network, int threadPoolSize, argument
99 mCache = cache;
108 * @param cache A Cache to use for persisting responses to disk
112 public RequestQueue(Cache cache, Networ argument
123 RequestQueue(Cache cache, Network network) argument
[all...]
H A DCacheDispatcher.java24 * Provides a thread for performing cache triage on a queue of requests.
26 * Requests added to the specified cache queue are resolved from cache.
42 /** The cache to read from. */
52 * Creates a new cache triage dispatcher thread. You must call {@link #start()}
57 * @param cache Cache interface to use for resolution
62 Cache cache, ResponseDelivery delivery) {
65 mCache = cache;
83 // Make a blocking call to initialize the cache.
88 // Get a request from the cache triag
60 CacheDispatcher( BlockingQueue<Request<?>> cacheQueue, BlockingQueue<Request<?>> networkQueue, Cache cache, ResponseDelivery delivery) argument
[all...]
H A DNetworkDispatcher.java30 * specified {@link Network} interface. Responses are committed to cache, if
39 /** The cache to write to. */
52 * @param cache Cache interface to use for writing responses to cache
56 Network network, Cache cache,
60 mCache = cache;
124 // Write to cache if applicable.
125 // TODO: Only update cache metadata instead of entire record for 304s.
128 request.addMarker("network-cache-written");
55 NetworkDispatcher(BlockingQueue<Request<?>> queue, Network network, Cache cache, ResponseDelivery delivery) argument
/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/packages/SettingsProvider/src/com/android/providers/settings/
H A DSettingsProvider.java110 // want to cache the existence of a key, but not store its value.
467 // threads might wind up here, the second having read the cache entries
517 // Only populate the globals cache once, for the owning user
525 // Slurp all values (if sane in number & size) into cache.
526 private void fullyPopulateCache(DatabaseHelper dbHelper, String table, SettingsCache cache) { argument
534 synchronized (cache) {
535 cache.evictAll();
536 cache.setFullyMatchesDisk(true); // optimistic
542 cache.populate(name, value);
547 cache
852 lookupValue(DatabaseHelper dbHelper, String table, final SettingsCache cache, String key) argument
1363 populate(SettingsCache cache, ContentValues contentValues) argument
1391 isRedundantSetValue(SettingsCache cache, String name, String value) argument
[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/core/java/android/os/
H A DServiceManager.java130 * @param cache the cache of service references
133 public static void initServiceCache(Map<String, IBinder> cache) { argument
137 sCache.putAll(cache);
/frameworks/testing/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/emoji/
H A DEmojiFactory.java36 // HashMap for caching Bitmap object. In order not to make a cache object
46 * If size() becomes more than sCacheSize, least recently used cache
102 WeakReference<Bitmap> cache = mCache.get(pua);
103 if (cache == null) {
105 // There is no need to cache returned null, since in most cases it means there
113 Bitmap tmp = cache.get();
/frameworks/base/core/java/com/android/internal/util/
H A DArrayUtils.java111 Object cache = sCache[bucket];
113 if (cache == null || cache.getClass().getComponentType() != kind) {
114 cache = Array.newInstance(kind, 0);
115 sCache[bucket] = cache;
117 // Log.e("cache", "new empty " + kind.getName() + " at " + bucket);
120 return (T[]) cache;
/frameworks/compile/mclinker/lib/Support/Unix/
H A DFileSystem.inc46 // idx does not stay at the end, but all elements had beed put into cache.
66 // set cache is full, then Directory::begin() can return end().
70 // read one entry for advance the end element of the cache.

Completed in 2415 milliseconds

123