/frameworks/base/services/tests/wmtests/src/com/android/server/wm/utils/ |
D | RotationCacheTest.java | 43 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/ |
D | egl_cache_test.cpp | 36 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/ |
D | nnCache_test.cpp | 41 mCache = NNCache::get(); in SetUp() 45 mCache->setCacheFilename(""); in TearDown() 46 mCache->terminate(); in TearDown() 49 NNCache* mCache; member in android::NNCacheTest 64 mCache->setBlob("abcd", 4, "efgh", 4); in TEST_P() 65 ASSERT_EQ(0, mCache->getBlob("abcd", 4, buf, 4)); in TEST_P() 74 mCache->initialize(maxKeySize, maxValueSize, maxTotalSize, GetParam()); in TEST_P() 75 mCache->setBlob("abcd", 4, "efgh", 4); in TEST_P() 76 ASSERT_EQ(4, mCache->getBlob("abcd", 4, buf, 4)); in TEST_P() 85 mCache->initialize(maxKeySize, maxValueSize, maxTotalSize, GetParam()); in TEST_P() [all …]
|
/frameworks/base/core/tests/coretests/src/android/content/res/ |
D | ConfigurationBoundResourceCacheTest.java | 31 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/ |
D | TaskSnapshotCacheTest.java | 41 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/ |
D | AnqpCacheTest.java | 46 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/ |
D | ScriptIntrinsicLUT.java | 28 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/ |
D | ScriptIntrinsicLUT.java | 30 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/ |
D | RemoteViewsAdapter.java | 110 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/opt/bitmap/src/com/android/bitmap/ |
D | UnrefedPooledCache.java | 46 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/2.0/ |
D | BufferPoolClient.cpp | 139 } 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 …]
|
D | ClientManager.cpp | 149 } mCache; member in android::hardware::media::bufferpool::V2_0::implementation::ClientManager::Impl 173 std::unique_lock<std::mutex> lock(mCache.mMutex); in registerSender() 174 for (auto it = mCache.mClients.begin(); it != mCache.mClients.end(); ++it) { in registerSender() 186 mCache.mClients.erase(it); in registerSender() 190 if (!mCache.mConnecting) { in registerSender() 191 mCache.mConnecting = true; in registerSender() 205 mCache.mClients.push_back(std::make_pair(accessor, wclient)); in registerSender() 215 mCache.mConnecting = false; in registerSender() 217 mCache.mConnectCv.notify_all(); in registerSender() 220 mCache.mConnectCv.wait_for( in registerSender() [all …]
|
/frameworks/av/media/bufferpool/1.0/ |
D | BufferPoolClient.cpp | 130 } 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 …]
|
D | ClientManager.cpp | 145 } 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/ |
D | ConfigParser.java | 51 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/base/services/core/java/com/android/server/hdmi/ |
D | HdmiCecMessageCache.java | 39 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/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/ |
D | TaskKeyLruCache.java | 39 private final LruCache<Integer, V> mCache; field in TaskKeyLruCache 48 mCache = new LruCache<Integer, V>(cacheSize) { in TaskKeyLruCache() 62 mCache.trimToSize(cacheSize); in trimToSize() 79 return mCache.get(id); in getCacheEntry() 84 mCache.put(id, value); in putCacheEntry() 89 mCache.remove(id); in removeCacheEntry() 94 mCache.evictAll(); in evictAllCache()
|
/frameworks/av/media/libstagefright/ |
D | NuCachedSource2.cpp | 189 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/services/core/java/com/android/server/locksettings/ |
D | LockSettingsStorage.java | 90 private final Cache mCache = new Cache(); field in LockSettingsStorage 207 mCache.putKeyValue(key, value, userId); in writeKeyValue() 216 synchronized (mCache) { in readKeyValue() 217 if (mCache.hasKeyValue(key, userId)) { in readKeyValue() 218 return mCache.peekKeyValue(key, defaultValue, userId); in readKeyValue() 220 version = mCache.getVersion(); in readKeyValue() 235 mCache.putKeyValueIfUnchanged(key, result, userId, version); in readKeyValue() 241 synchronized (mCache) { in prefetchUser() 242 if (mCache.isFetched(userId)) { in prefetchUser() 245 mCache.setFetched(userId); in prefetchUser() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/ |
D | DynamicPrivacyControllerTest.java | 49 private UnlockMethodCache mCache = mock(UnlockMethodCache.class); field in DynamicPrivacyControllerTest 57 when(mCache.canSkipBouncer()).thenReturn(false); in setUp() 59 mLockScreenUserManager, mCache); in setUp() 66 when(mCache.canSkipBouncer()).thenReturn(false); in testDynamicFalseWhenCannotSkipBouncer() 74 when(mCache.canSkipBouncer()).thenReturn(true); in testDynamicTrueWhenCanSkipBouncer() 81 when(mCache.canSkipBouncer()).thenReturn(true); in testNotifiedWhenEnabled() 94 when(mCache.canSkipBouncer()).thenReturn(true); in testNotNotifiedWithoutNotifications()
|
/frameworks/base/services/core/java/com/android/server/wm/utils/ |
D | RotationCache.java | 34 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/ |
D | HwcBufferCacheTest.cpp | 42 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::__anon16e3fc3c0111::HwcBufferCacheTest
|
/frameworks/base/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/ |
D | TaskKeyStrongCache.java | 34 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/src/com/android/systemui/statusbar/notification/row/ |
D | NotificationInlineImageCache.java | 36 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()
|
/frameworks/minikin/include/minikin/ |
D | LayoutCache.h | 131 mCache.clear(); in clear() 146 LayoutPiece* layout = mCache.get(key); in getOrCreate() 161 mCache.put(key, layout.release()); in getOrCreate() 171 mCache.size(), kMaxEntries, mCacheHitCount, mRequestCount, ratio); in dumpStats() 176 mCache.size(), kMaxEntries, mCacheHitCount, mRequestCount, ratio); in dumpStats() 180 dprintf(fd, " Usage: %zd/%zd entries\n", mCache.size(), kMaxEntries); in dumpStats() 192 LayoutCache(uint32_t maxEntries) : mCache(maxEntries), mRequestCount(0), mCacheHitCount(0) { in LayoutCache() 193 mCache.setOnEntryRemovedListener(this); in LayoutCache() 198 return mCache.size(); in getCacheSize() 208 android::LruCache<LayoutCacheKey, LayoutPiece*> mCache GUARDED_BY(mMutex);
|