Home
last modified time | relevance | path

Searched refs:mCache (Results 1 – 25 of 54) sorted by relevance

123

/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/shared/recents/model/
DTaskKeyLruCacheTest.java41 TaskKeyCache<Integer> mCache = new TaskKeyLruCache<>(sCacheSize, null); field in TaskKeyLruCacheTest
55 mCache.put(mKey1, 1); in addSingleItem_get_success()
57 assertEquals(1, (int) mCache.get(mKey1)); in addSingleItem_get_success()
62 mCache.put(mKey1, 1); in addSingleItem_getUninsertedItem_returnsNull()
64 assertNull(mCache.get(mKey2)); in addSingleItem_getUninsertedItem_returnsNull()
69 assertNull(mCache.get(mKey1)); in emptyCache_get_returnsNull()
74 mCache.put(mKey1, 1); in updateItem_get_returnsSecond()
75 mCache.put(mKey1, 2); in updateItem_get_returnsSecond()
77 assertEquals(2, (int) mCache.get(mKey1)); in updateItem_get_returnsSecond()
78 assertEquals(1, mCache.mKeys.size()); in updateItem_get_returnsSecond()
[all …]
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/utils/
DRotationCacheTest.java43 private RotationCache<Object, Pair<Object, Integer>> mCache; field in RotationCacheTest
49 mCache = new RotationCache<>((o, rot) -> { in setUp()
57 assertThat(mCache.getOrCompute("hello", 0), equalTo(create("hello", 0))); in getOrCompute_computes()
58 assertThat(mCache.getOrCompute("hello", 1), equalTo(create("hello", 1))); in getOrCompute_computes()
59 assertThat(mCache.getOrCompute("hello", 2), equalTo(create("hello", 2))); in getOrCompute_computes()
60 assertThat(mCache.getOrCompute("hello", 3), equalTo(create("hello", 3))); in getOrCompute_computes()
65 assertNotNull(mCache.getOrCompute("hello", 1)); in getOrCompute_sameParam_sameRot_hitsCache()
68 assertThat(mCache.getOrCompute("hello", 1), equalTo(create("hello", 1))); in getOrCompute_sameParam_sameRot_hitsCache()
74 assertNotNull(mCache.getOrCompute("hello", 3)); in getOrCompute_sameParam_hitsCache_forAllRots()
75 assertNotNull(mCache.getOrCompute("hello", 2)); in getOrCompute_sameParam_hitsCache_forAllRots()
[all …]
/frameworks/native/opengl/tests/EGLTest/
Degl_cache_test.cpp36 mCache = egl_cache_t::get(); in SetUp()
40 mCache->setCacheFilename(""); in TearDown()
41 mCache->terminate(); in TearDown()
44 egl_cache_t* mCache; member in android::EGLCacheTest
49 mCache->setBlob("abcd", 4, "efgh", 4); in TEST_F()
50 ASSERT_EQ(0, mCache->getBlob("abcd", 4, buf, 4)); in TEST_F()
59 mCache->initialize(egl_display_t::get(EGL_DEFAULT_DISPLAY)); in TEST_F()
60 mCache->setBlob("abcd", 4, "efgh", 4); in TEST_F()
61 ASSERT_EQ(4, mCache->getBlob("abcd", 4, buf, 4)); in TEST_F()
70 mCache->initialize(egl_display_t::get(EGL_DEFAULT_DISPLAY)); in TEST_F()
[all …]
/frameworks/ml/nn/driver/cache/nnCache/
DnnCache_test.cpp40 virtual void SetUp() { mCache = NNCache::get(); } in SetUp()
43 mCache->setCacheFilename(""); in TearDown()
44 mCache->terminate(); in TearDown()
47 NNCache* mCache; member in android::NNCacheTest
63 mCache->setBlob("abcd", 4, "efgh", 4); in TEST_P()
64 ASSERT_EQ(0, mCache->getBlob("abcd", 4, buf, 4)); in TEST_P()
73 mCache->initialize(maxKeySize, maxValueSize, maxTotalSize, GetParam()); in TEST_P()
74 mCache->setBlob("abcd", 4, "efgh", 4); in TEST_P()
75 ASSERT_EQ(4, mCache->getBlob("abcd", 4, buf, 4)); in TEST_P()
84 mCache->initialize(maxKeySize, maxValueSize, maxTotalSize, GetParam()); in TEST_P()
[all …]
/frameworks/base/core/tests/coretests/src/android/content/res/
DConfigurationBoundResourceCacheTest.java31 ConfigurationBoundResourceCache<Float> mCache; field in ConfigurationBoundResourceCacheTest
40 mCache = new ConfigurationBoundResourceCache<>(); in setUp()
46 assertNull(mCache.getInstance(-1, res, null)); in testGetEmpty()
51 mCache.put(1, null, new DummyFloatConstantState(5f)); in testSetGet()
53 assertEquals(5f, mCache.getInstance(1, res, null)); in testSetGet()
54 assertNotSame(5f, mCache.getInstance(1, res, null)); in testSetGet()
55 assertEquals(null, mCache.getInstance(1, res, getActivity().getTheme())); in testSetGet()
60 mCache.put(1, getActivity().getTheme(), new DummyFloatConstantState(5f)); in testSetGetThemed()
62 assertEquals(null, mCache.getInstance(1, res, null)); in testSetGetThemed()
63 assertEquals(5f, mCache.getInstance(1, res, getActivity().getTheme())); in testSetGetThemed()
[all …]
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DTaskSnapshotCacheTest.java41 private TaskSnapshotCache mCache; field in TaskSnapshotCacheTest
48 mCache = new TaskSnapshotCache(mWm, mLoader); in setUp()
54 mCache.putSnapshot(window.getTask(), createSnapshot()); in testAppRemoved()
55 assertNotNull(mCache.getSnapshot(window.getTask().mTaskId, 0 /* userId */, in testAppRemoved()
57 mCache.onAppRemoved(window.mAppToken); in testAppRemoved()
58 assertNull(mCache.getSnapshot(window.getTask().mTaskId, 0 /* userId */, in testAppRemoved()
65 mCache.putSnapshot(window.getTask(), createSnapshot()); in testAppDied()
66 assertNotNull(mCache.getSnapshot(window.getTask().mTaskId, 0 /* userId */, in testAppDied()
68 mCache.onAppDied(window.mAppToken); in testAppDied()
69 assertNull(mCache.getSnapshot(window.getTask().mTaskId, 0 /* userId */, in testAppDied()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/
DAnqpCacheTest.java46 AnqpCache mCache; field in AnqpCacheTest
56 mCache = new AnqpCache(mClock); in setUp()
66 mCache.addEntry(ENTRY_KEY, null); in addAndGetEntry()
67 ANQPData data = mCache.getEntry(ENTRY_KEY); in addAndGetEntry()
79 assertNull(mCache.getEntry(ENTRY_KEY)); in getNonExistEntry()
89 mCache.addEntry(ENTRY_KEY, null); in sweepRemoveExpiredEntry()
94 mCache.sweep(); in sweepRemoveExpiredEntry()
95 assertNotNull(mCache.getEntry(ENTRY_KEY)); in sweepRemoveExpiredEntry()
99 mCache.sweep(); in sweepRemoveExpiredEntry()
100 assertNull(mCache.getEntry(ENTRY_KEY)); in sweepRemoveExpiredEntry()
/frameworks/base/rs/java/android/renderscript/
DScriptIntrinsicLUT.java28 private final byte mCache[] = new byte[1024]; field in ScriptIntrinsicLUT
35 mCache[ct] = (byte)ct; in ScriptIntrinsicLUT()
36 mCache[ct + 256] = (byte)ct; in ScriptIntrinsicLUT()
37 mCache[ct + 512] = (byte)ct; in ScriptIntrinsicLUT()
38 mCache[ct + 768] = (byte)ct; in ScriptIntrinsicLUT()
81 mCache[index] = (byte)value; in setRed()
93 mCache[index+256] = (byte)value; in setGreen()
105 mCache[index+512] = (byte)value; in setBlue()
117 mCache[index+768] = (byte)value; in setAlpha()
143 mTables.copyFromUnchecked(mCache); in forEach()
/frameworks/rs/support/java/src/androidx/renderscript/
DScriptIntrinsicLUT.java30 private final byte mCache[] = new byte[1024]; field in ScriptIntrinsicLUT
60 si.mCache[ct] = (byte)ct; in create()
61 si.mCache[ct + 256] = (byte)ct; in create()
62 si.mCache[ct + 512] = (byte)ct; in create()
63 si.mCache[ct + 768] = (byte)ct; in create()
87 mCache[index] = (byte)value;
99 mCache[index+256] = (byte)value;
111 mCache[index+512] = (byte)value;
123 mCache[index+768] = (byte)value;
138 mTables.copyFromUnchecked(mCache);
/frameworks/base/core/java/android/widget/
DRemoteViewsAdapter.java110 private final FixedSizeRemoteViewsCache mCache; field in RemoteViewsAdapter
281 synchronized (adapter.mCache) { in handleMessage()
282 adapter.mCache.reset(); in handleMessage()
289 synchronized (adapter.mCache.getTemporaryMetaData()) { in handleMessage()
290 newCount = adapter.mCache.getTemporaryMetaData().count; in handleMessage()
319 final int position = adapter.mCache.getNextIndexToLoad(); in handleMessage()
370 private final FixedSizeRemoteViewsCache mCache; field in RemoteViewsAdapter.RemoteViewsFrameLayout
376 mCache = cache; in RemoteViewsFrameLayout()
399 int viewHeight = mCache.getMetaData().getLoadingTemplate(getContext()).defaultHeight; in getDefaultView()
871 mCache = new FixedSizeRemoteViewsCache(DEFAULT_CACHE_SIZE, config); in RemoteViewsAdapter()
[all …]
/frameworks/av/media/bufferpool/2.0/
DBufferPoolClient.cpp139 } mCache; member in android::hardware::media::bufferpool::V2_0::implementation::BufferPoolClient::Impl
183 std::weak_ptr<BufferPoolData> mCache; member
219 std::shared_ptr<BufferPoolData> cache = mCache.lock(); in fetchCache()
238 mCache = cache; in createCache()
319 std::lock_guard<std::mutex> lock(mCache.mLock); in isActive()
322 *lastTransactionUs = mCache.mLastChangeUs; in isActive()
323 active = mCache.mActive > 0; in isActive()
333 std::lock_guard<std::mutex> lock(mCache.mLock); in receiveInvalidation()
343 std::unique_lock<std::mutex> lock(mCache.mLock); in flush()
363 std::unique_lock<std::mutex> lock(mCache.mLock); in allocate()
[all …]
/frameworks/opt/bitmap/src/com/android/bitmap/
DUnrefedPooledCache.java46 private final LinkedHashMap<K, V> mCache; field in UnrefedPooledCache
60 mCache = new LinkedHashMap<K, V>(0, 0.75f, true); in UnrefedPooledCache()
74 synchronized (mCache) { in get()
75 V result = mCache.get(key); in get()
95 synchronized (mCache) { in put()
98 prev = mCache.put(key, value); in put()
129 synchronized (mCache) { in poll()
132 for (Map.Entry<K, V> entry : mCache.entrySet()) { in poll()
155 mCache.remove(eldestUnref.getKey()); in poll()
175 synchronized (mCache) { in toDebugString()
[all …]
/frameworks/av/media/bufferpool/1.0/
DBufferPoolClient.cpp130 } mCache; member in android::hardware::media::bufferpool::V1_0::implementation::BufferPoolClient::Impl
171 std::weak_ptr<BufferPoolData> mCache; member
204 std::shared_ptr<BufferPoolData> cache = mCache.lock(); in fetchCache()
223 mCache = cache; in createCache()
288 std::lock_guard<std::mutex> lock(mCache.mLock); in isActive()
291 *lastTransactionUs = mCache.mLastChangeUs; in isActive()
292 active = mCache.mActive > 0; in isActive()
314 std::unique_lock<std::mutex> lock(mCache.mLock); in allocate()
317 auto cacheIt = mCache.mBuffers.find(bufferId); in allocate()
318 if (cacheIt != mCache.mBuffers.end()) { in allocate()
[all …]
DClientManager.cpp145 } mCache; member in android::hardware::media::bufferpool::V1_0::implementation::ClientManager::Impl
166 std::unique_lock<std::mutex> lock(mCache.mMutex); in registerSender()
167 for (auto it = mCache.mClients.begin(); it != mCache.mClients.end(); ++it) { in registerSender()
179 mCache.mClients.erase(it); in registerSender()
183 if (!mCache.mConnecting) { in registerSender()
184 mCache.mConnecting = true; in registerSender()
198 mCache.mClients.push_back(std::make_pair(accessor, wclient)); in registerSender()
207 mCache.mConnecting = false; in registerSender()
209 mCache.mConnectCv.notify_all(); in registerSender()
212 mCache.mConnectCv.wait_for( in registerSender()
[all …]
/frameworks/base/core/java/android/view/textclassifier/
DConfigParser.java51 private final Map<String, Object> mCache = new ArrayMap<>(); field in ConfigParser
80 final Object cached = mCache.get(key); in getBoolean()
93 mCache.put(key, value); in getBoolean()
103 final Object cached = mCache.get(key); in getInt()
116 mCache.put(key, value); in getInt()
126 final Object cached = mCache.get(key); in getFloat()
139 mCache.put(key, value); in getFloat()
149 final Object cached = mCache.get(key); in getString()
162 mCache.put(key, value); in getString()
172 final Object cached = mCache.get(key); in getStringList()
[all …]
/frameworks/av/media/libdatasource/
DNuCachedSource2.cpp189 mCache(new PageCache(kPageSize)), in NuCachedSource2()
235 delete mCache; in ~NuCachedSource2()
236 mCache = NULL; in ~NuCachedSource2()
343 mSource->reconnectAtOffset(mCacheOffset + mCache->totalSize()); in fetchInternal()
364 PageCache::Page *page = mCache->acquirePage(); in fetchInternal()
367 mCacheOffset + mCache->totalSize(), page->mData, kPageSize); in fetchInternal()
377 mCache->releasePage(page); in fetchInternal()
387 mCache->releasePage(page); in fetchInternal()
396 mCache->appendPage(page); in fetchInternal()
423 if (mFetching && mCache->totalSize() >= mHighwaterThresholdBytes) { in onFetch()
[all …]
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/
DTaskKeyLruCache.java39 private final LruCache<Integer, V> mCache; field in TaskKeyLruCache
48 mCache = new LruCache<Integer, V>(cacheSize) { in TaskKeyLruCache()
66 mCache.trimToSize(cacheSize); in trimToSize()
83 return mCache.get(id); in getCacheEntry()
88 mCache.put(id, value); in putCacheEntry()
93 mCache.remove(id); in removeCacheEntry()
98 mCache.evictAll(); in evictAllCache()
/frameworks/base/services/core/java/com/android/server/hdmi/
DHdmiCecMessageCache.java39 private final SparseArray<SparseArray<HdmiCecMessage>> mCache = new SparseArray<>(); field in HdmiCecMessageCache
54 SparseArray<HdmiCecMessage> messages = mCache.get(address); in getMessage()
68 mCache.remove(address); in flushMessagesFrom()
75 mCache.clear(); in flushAll()
91 SparseArray<HdmiCecMessage> messages = mCache.get(source); in cacheMessage()
94 mCache.put(source, messages); in cacheMessage()
/frameworks/base/services/core/java/com/android/server/locksettings/
DLockSettingsStorage.java92 private final Cache mCache = new Cache(); field in LockSettingsStorage
209 mCache.putKeyValue(key, value, userId); in writeKeyValue()
218 synchronized (mCache) { in readKeyValue()
219 if (mCache.hasKeyValue(key, userId)) { in readKeyValue()
220 return mCache.peekKeyValue(key, defaultValue, userId); in readKeyValue()
222 version = mCache.getVersion(); in readKeyValue()
237 mCache.putKeyValueIfUnchanged(key, result, userId, version); in readKeyValue()
243 synchronized (mCache) { in prefetchUser()
244 if (mCache.isFetched(userId)) { in prefetchUser()
247 mCache.setFetched(userId); in prefetchUser()
[all …]
/frameworks/base/core/java/android/app/
DPropertyInvalidatedCache.java182 private final LinkedHashMap<Query, Result> mCache; field in PropertyInvalidatedCache
203 mCache = new LinkedHashMap<Query, Result>( in PropertyInvalidatedCache()
219 mCache.clear(); in clear()
264 mCache.clear(); in disableLocal()
294 cachedResult = mCache.get(query); in query()
301 mCache.clear(); in query()
332 mCache.remove(query); in query()
334 mCache.put(query, refreshedResult); in query()
353 mCache.put(query, result); in query()
/frameworks/base/services/core/java/com/android/server/wm/utils/
DRotationCache.java34 private final SparseArray<R> mCache = new SparseArray<>(4); field in RotationCache
50 mCache.clear(); in getOrCompute()
53 final int idx = mCache.indexOfKey(rotation); in getOrCompute()
55 return mCache.valueAt(idx); in getOrCompute()
58 mCache.put(rotation, result); in getOrCompute()
/frameworks/native/services/surfaceflinger/CompositionEngine/tests/
DHwcBufferCacheTest.cpp42 mCache.getHwcBuffer(inSlot, mBuffer1, &outSlot, &outBuffer); in testSlot()
47 mCache.getHwcBuffer(inSlot, mBuffer1, &outSlot, &outBuffer); in testSlot()
52 mCache.getHwcBuffer(inSlot, mBuffer2, &outSlot, &outBuffer); in testSlot()
57 mCache.getHwcBuffer(inSlot, mBuffer2, &outSlot, &outBuffer); in testSlot()
63 mCache.getHwcBuffer(inSlot, sp<GraphicBuffer>(), &outSlot, &outBuffer); in testSlot()
68 impl::HwcBufferCache mCache; member in android::compositionengine::__anond56271f30111::HwcBufferCacheTest
/frameworks/base/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/
DTaskKeyStrongCache.java34 private final ArrayMap<Integer, V> mCache = new ArrayMap<>(); field in TaskKeyStrongCache
39 put(key, other.mCache.get(key.id)); in copyEntries()
56 return mCache.get(id); in getCacheEntry()
61 mCache.put(id, value); in putCacheEntry()
66 mCache.remove(id); in removeCacheEntry()
71 mCache.clear(); in evictAllCache()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/
DDynamicPrivacyControllerTest.java52 private UnlockMethodCache mCache = mock(UnlockMethodCache.class); field in DynamicPrivacyControllerTest
61 when(mCache.canSkipBouncer()).thenReturn(false); in setUp()
64 mLockScreenUserManager, mKeyguardMonitor, mCache, in setUp()
74 when(mCache.canSkipBouncer()).thenReturn(false); in testDynamicFalseWhenCannotSkipBouncer()
82 when(mCache.canSkipBouncer()).thenReturn(true); in testDynamicTrueWhenCanSkipBouncer()
89 when(mCache.canSkipBouncer()).thenReturn(true); in testNotifiedWhenEnabled()
102 when(mCache.canSkipBouncer()).thenReturn(true); in testNotNotifiedWithoutNotifications()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/
DNotificationInlineImageCache.java36 private final ConcurrentHashMap<Uri, PreloadImageTask> mCache; field in NotificationInlineImageCache
39 mCache = new ConcurrentHashMap<>(); in NotificationInlineImageCache()
49 return mCache.containsKey(uri); in hasEntry()
56 mCache.put(uri, newTask); in preload()
63 result = mCache.get(uri).get(); in get()
73 mCache.entrySet().removeIf(entry -> !wantedSet.contains(entry.getKey())); in purge()

123