Home
last modified time | relevance | path

Searched refs:mMap (Results 1 – 25 of 26) sorted by relevance

12

/packages/modules/Connectivity/staticlibs/testutils/devicetests/com/android/testutils/
DTestBpfMap.java44 private final ConcurrentHashMap<K, V> mMap = new ConcurrentHashMap<>(); field in TestBpfMap
56 for (Map.Entry<K, V> entry : mMap.entrySet()) { in forEach()
63 mMap.put(key, value); in updateEntry()
70 if (mMap.get(key) != null) { in insertEntry()
73 mMap.put(key, value); in insertEntry()
78 if (!mMap.containsKey(key)) throw new NoSuchElementException(); in replaceEntry()
79 mMap.put(key, value); in replaceEntry()
85 boolean ret = !mMap.containsKey(key); in insertOrReplaceEntry()
86 mMap.put(key, value); in insertOrReplaceEntry()
92 return mMap.remove(key) != null; in deleteEntry()
[all …]
/packages/services/Car/service/src/com/android/car/util/
DSetMultimap.java34 private Map<K, Set<V>> mMap; field in SetMultimap
38 mMap = new HashMap<>(); in SetMultimap()
43 return Collections.unmodifiableSet(mMap.getOrDefault(key, Collections.emptySet())); in get()
48 return mMap.computeIfAbsent(key, k -> new HashSet<>()).add(value); in put()
53 Set<V> set = mMap.get(key); in containsEntry()
59 Set<V> set = mMap.get(key); in remove()
66 mMap.remove(key); in remove()
73 mMap.clear(); in clear()
78 return Collections.unmodifiableSet(mMap.keySet()); in keySet()
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/util/
DTaskKeyLruCache.java32 private final MyLinkedHashMap<V> mMap; field in TaskKeyLruCache
35 mMap = new MyLinkedHashMap<>(maxSize); in TaskKeyLruCache()
42 mMap.clear(); in evictAll()
49 mMap.remove(key.id); in remove()
56 mMap.entrySet().removeIf(e -> keyCheck.test(e.getValue().mKey)); in removeAll()
63 Entry<V> entry = mMap.get(key.id); in getAndInvalidateIfModified()
79 mMap.put(key.id, new Entry<>(key, value)); in put()
89 Entry<V> entry = mMap.get(taskId); in updateIfAlreadyInCache()
97 return mMap.mMaxSize; in getMaxSize()
102 return mMap.size(); in getSize()
DTaskKeyByLastActiveTimeCache.java42 private final Map<Integer, Entry<V>> mMap; field in TaskKeyByLastActiveTimeCache
47 mMap = new HashMap(0); in TaskKeyByLastActiveTimeCache()
57 mMap.clear(); in evictAll()
71 Entry<V> entry = mMap.remove(key.id); in remove()
87 mMap.remove(key.id); in removeAll()
98 Entry<V> entry = mMap.get(key.id); in getAndInvalidateIfModified()
115 Entry<V> entry = mMap.get(key.id); in put()
122 mMap.put(key.id, new Entry<>(key, value)); in put()
134 Entry<V> entry = mMap.get(taskId); in updateIfAlreadyInCache()
153 mMap.remove(key.id); in removeExcessIfNeeded()
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/
DScanDetailCache.java42 private final HashMap<String, ScanDetail> mMap; field in ScanDetailCache
59 mMap = new HashMap(16, 0.75f); in ScanDetailCache()
64 if (mMap.size() >= mMaxSize) { in put()
68 mMap.put(scanDetail.getBSSIDString(), scanDetail); in put()
89 return mMap.get(bssid); in getScanDetail()
93 mMap.remove(bssid); in remove()
97 return mMap.size(); in size()
105 return mMap.keySet(); in keySet()
109 return mMap.values(); in values()
117 int currentSize = mMap.size(); in trim()
[all …]
/packages/modules/Connectivity/service-t/src/com/android/server/net/
DTrafficStatsRateLimitCache.java48 mMap = new LruCache<>(maxSize); in TrafficStatsRateLimitCache()
87 private final LruCache<TrafficStatsCacheKey, TrafficStatsCacheValue> mMap; field in TrafficStatsRateLimitCache
99 synchronized (mMap) { // Synchronize for thread-safety in get()
100 final TrafficStatsCacheValue value = mMap.get(key); in get()
104 mMap.remove(key); // Remove expired entries in get()
125 synchronized (mMap) { in getOrCompute()
150 synchronized (mMap) { // Synchronize for thread-safety in put()
151 mMap.put(key, new TrafficStatsCacheValue(mClock.millis(), entry)); in put()
159 synchronized (mMap) { in clear()
160 mMap.evictAll(); in clear()
/packages/apps/Contacts/src-bind/com/android/contactsbind/experiments/
DFlags.java29 private Map<String, Object> mMap; field in Flags
39 mMap = new HashMap<>(); in Flags()
43 return mMap.containsKey(flagName) ? (boolean) mMap.get(flagName) : false; in getBoolean()
47 return mMap.containsKey(flagName) ? ((Integer) mMap.get(flagName)).intValue() : 0; in getInteger()
/packages/apps/Gallery2/src/com/android/gallery3d/data/
DPathMatcher.java73 private HashMap<String, Node> mMap; field in PathMatcher.Node
77 if (mMap == null) { in addChild()
78 mMap = new HashMap<String, Node>(); in addChild()
80 Node node = mMap.get(segment); in addChild()
85 mMap.put(segment, n); in addChild()
90 if (mMap == null) return null; in getChild()
91 return mMap.get(segment); in getChild()
/packages/modules/StatsD/statsd/src/packages/
DUidMap.cpp98 auto it = mMap.find(std::make_pair(uid, packageName)); in hasApp()
99 return it != mMap.end() && !it->second.deleted; in hasApp()
115 for (const auto& kv : mMap) { in getAppNamesFromUidLocked()
126 auto it = mMap.find(std::make_pair(uid, packageName)); in getAppVersion()
127 if (it == mMap.end() || it->second.deleted) { in getAppVersion()
141 for (const auto& kv : mMap) { in updateMap()
147 mMap.clear(); in updateMap()
149 mMap[std::make_pair(appInfo.uid(), appInfo.package_name())] = in updateMap()
155 auto mMapIt = mMap.find(kv.first); in updateMap()
156 if (mMapIt != mMap.end()) { in updateMap()
[all …]
/packages/services/AlternativeNetworkAccess/tests/src/com/android/ons/
DONSStatsTest.java60 HashMap<String, Object> mMap = new HashMap<>(); field in ONSStatsTest.FakeSharedPreferences
64 return mMap; in getAll()
69 return (String) mMap.getOrDefault(key, defValue); in getString()
74 if (mMap.containsKey(key)) { in getStringSet()
75 return (Set<String>) mMap.get(key); in getStringSet()
82 return (int) mMap.getOrDefault(key, defValue); in getInt()
92 return (float) mMap.getOrDefault(key, defValue); in getFloat()
97 return (boolean) mMap.getOrDefault(key, defValue); in getBoolean()
102 return mMap.containsKey(key); in contains()
108 editor.map = mMap; in edit()
[all …]
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/
DMockSuggestionExtras.java26 HashMap<String, Object> mMap; field in MockSuggestionExtras
30 mMap = new HashMap<String, Object>(); in MockSuggestionExtras()
34 mMap.put(name, value); in put()
40 Object o = mMap.get(columnName); in doGetExtra()
46 return mMap.keySet(); in doGetExtraColumnNames()
/packages/modules/OnDevicePersonalization/federatedcompute/src/com/android/federatedcompute/services/training/util/
DListenableSupplier.java34 private final ConcurrentHashMap<Runnable, Executor> mMap; field in ListenableSupplier
39 mMap = new ConcurrentHashMap<>(); in ListenableSupplier()
49 for (Map.Entry<Runnable, Executor> entry : mMap.entrySet()) { in runListeners()
61 mMap.put(listener, executor); in addListener()
66 mMap.remove(listener); in removeListener()
/packages/services/Car/service/src/com/android/car/hal/
DBidirectionalSparseIntArray.java26 private final SparseIntArray mMap; field in BidirectionalSparseIntArray
51 return mMap.get(key, defaultValue); in getValue()
62 mMap = new SparseIntArray(initialCapacity); in BidirectionalSparseIntArray()
67 mMap.put(key, value); in put()
DHalServiceBase.java124 private final BidirectionalSparseIntArray mMap; field in HalServiceBase.ManagerToHalPropIdMap
136 mMap = map; in ManagerToHalPropIdMap()
140 return mMap.getValue(managerPropId, NOT_SUPPORTED_PROPERTY); in getHalPropId()
144 return mMap.getKey(halPropId, NOT_SUPPORTED_PROPERTY); in getManagerPropId()
/packages/apps/Gallery/tests/src/com/android/camera/gallery/
DLruCacheUnitTests.java42 private final LruCache<Integer,Integer> mMap; field in LruCacheUnitTests.Accessor
45 mMap = map; in Accessor()
52 mMap.get(i % 2); in run()
/packages/modules/ConfigInfrastructure/framework/java/android/provider/
DDeviceConfig.java1728 private final HashMap<String, String> mMap; field in DeviceConfig.Properties
1742 mMap = new HashMap(); in Properties()
1744 mMap.putAll(keyValueMap); in Properties()
1762 mKeyset = Collections.unmodifiableSet(mMap.keySet()); in getKeyset()
1777 String value = mMap.get(name); in getString()
1785 return mMap.put(name, value); in setString()
1790 return mMap; in getMap()
1802 String value = mMap.get(name); in getBoolean()
1816 String value = mMap.get(name); in getInt()
1838 String value = mMap.get(name); in getLong()
[all …]
/packages/services/Car/tests/carservice_test/src/com/android/car/
DCarPropertyServiceTest.java277 private final Map<Integer, VehiclePropValue> mMap = new HashMap<>(); field in CarPropertyServiceTest.PropertyHandler
281 mMap.put(value.prop, value); in onPropertySet()
287 .that(mMap).containsKey(value.prop); in onPropertyGet()
288 VehiclePropValue currentValue = mMap.get(value.prop); in onPropertyGet()
295 .that(mMap).containsKey(property); in onPropertySubscribe()
303 .that(mMap).containsKey(property); in onPropertyUnsubscribe()
DCarCabinManagerTest.java179 HashMap<Integer, VehiclePropValue> mMap = new HashMap<>(); field in CarCabinManagerTest.CabinPropertyHandler
183 mMap.put(value.prop, value); in onPropertySet()
189 if (mMap.get(value.prop) == null) { in onPropertyGet()
196 return mMap.get(value.prop); in onPropertyGet()
DCarHvacManagerTest.java269 HashMap<Integer, VehiclePropValue> mMap = new HashMap<>(); field in CarHvacManagerTest.HvacPropertyHandler
273 mMap.put(value.prop, value); in onPropertySet()
278 VehiclePropValue currentValue = mMap.get(value.prop); in onPropertyGet()
286 if (mMap.get(property) == null) { in onPropertySubscribe()
311 mMap.put(property, placeholderValue); in onPropertySubscribe()
DCarProjectionManagerTest.java160 HashMap<Integer, VehiclePropValue> mMap = new HashMap<>(); field in CarProjectionManagerTest.PropertyHandler
165 mMap.put(value.prop, value); in onPropertySet()
171 VehiclePropValue currentValue = mMap.get(value.prop); in onPropertyGet()
/packages/services/Car/car-lib/src/com/android/car/internal/util/
DBinderKeyValueContainer.java67 private final BinderKeyValueContainer<K, V> mMap; field in BinderKeyValueContainer.BinderInterfaceHolder
71 mMap = map; in BinderInterfaceHolder()
79 mMap.removeByBinderInterfaceHolder(this); in binderDied()
/packages/apps/Launcher3/src/com/android/launcher3/model/
DWidgetsModel.java398 private final Map<PackageUserKey, PackageItemInfo> mMap = new ArrayMap<>(); field in WidgetsModel.PackageItemInfoCache
401 PackageItemInfo pInfo = mMap.get(key); in getOrCreate()
405 mMap.put(key, pInfo); in getOrCreate()
411 return mMap.values(); in values()
/packages/modules/NeuralNetworks/common/
DMetaModel.cpp159 auto it = mMap.find(operand); in getIndex()
160 if (it != mMap.end()) { in getIndex()
181 mMap[operand] = slicedOperandIndex; in getIndex()
234 std::map<Operand, uint32_t, Compare> mMap; member in android::nn::MetaModel::OrigOperandToSlicedInputOperandIndex
/packages/modules/Connectivity/service/src/com/android/server/connectivity/
DPermissionMonitor.java233 private final Map<T, Integer> mMap = new ArrayMap<>(); field in PermissionMonitor.MultiSet
239 final int oldCount = mMap.getOrDefault(key, 0); in add()
240 mMap.put(key, oldCount + 1); in add()
248 final int oldCount = mMap.getOrDefault(key, 0); in remove()
252 mMap.remove(key); in remove()
254 mMap.put(key, oldCount - 1); in remove()
260 return mMap.keySet(); in getSet()
/packages/modules/Uwb/service/java/com/android/server/uwb/
DUwbServiceCore.java219 private final Map<AttributionSourceHolder, Boolean> mMap = new HashMap<>(); field in UwbServiceCore.UwbClientHwState
222 Boolean prevValue = mMap.put(attributionSourceHolder, Boolean.valueOf(enable)); in setEnabled()
240 for (AttributionSourceHolder k : mMap.keySet()) { in getOrCreate()
249 return mMap.getOrDefault(attributionSourceHolder, false); in isEnabled()
266 return mMap.values().stream().filter(v -> v).findAny().orElse(false); in shouldHwBeEnabled()
271 return "UwbClientHwState [" + mMap + "]"; in toString()

12