/aosp14/system/core/libcutils/ |
H A D | hashmap.cpp | 49 if (map == NULL) { in hashmapCreate() 55 map->bucketCount = 1; in hashmapCreate() 61 map->buckets = static_cast<Entry**>(calloc(map->bucketCount, sizeof(Entry*))); in hashmapCreate() 63 free(map); in hashmapCreate() 67 map->size = 0; in hashmapCreate() 69 map->hash = hash; in hashmapCreate() 70 map->equals = equals; in hashmapCreate() 74 return map; in hashmapCreate() 102 if (map->size > (map->bucketCount * 3 / 4)) { in expandIfNecessary() 149 free(map->buckets); in hashmapFree() [all …]
|
H A D | str_parms.cpp | 48 Hashmap *map; member 75 s->map = hashmapCreate(5, str_hash_fn, str_eq); in str_parms_create() 76 if (!s->map) { in str_parms_create() 113 hashmapRemove(ctxt->str_parms->map, key); in remove_pair() 125 hashmapForEach(str_parms->map, remove_pair, &ctxt); in str_parms_del() 134 hashmapForEach(str_parms->map, remove_pair, &ctxt); in str_parms_destroy() 135 hashmapFree(str_parms->map); in str_parms_destroy() 179 old_val = hashmapPut(str_parms->map, key, value); in str_parms_create_str() 228 old_val = hashmapPut(str_parms->map, tmp_key, tmp_val); in str_parms_add_str() 357 hashmapForEach(str_parms->map, combine_strings, &str); in str_parms_to_str() [all …]
|
/aosp14/frameworks/base/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/ |
H A D | CompanionDeviceResources.java | 63 map.put(null, R.string.confirmation_title); in map.put() 65 TITLES = unmodifiableMap(map); 83 PERMISSION_TYPES = unmodifiableMap(map); 91 map.put(null, R.string.summary_generic); in map.put() 93 SUMMARIES = unmodifiableMap(map); 101 map.put(null, R.string.profile_name_generic); in map.put() 103 PROFILES_NAME = unmodifiableMap(map); 111 map.put(null, R.string.profile_name_generic); in map.put() 113 PROFILES_NAME_MULTI = unmodifiableMap(map); 121 map.put(null, R.drawable.ic_device_other); in map.put() [all …]
|
H A D | PermissionListAdapter.java | 60 final Map<Integer, Integer> map = new ArrayMap<>(); 64 map.put(PERMISSION_PHONE, R.string.permission_phone); in map.put() 65 map.put(PERMISSION_SMS, R.string.permission_sms); in map.put() 72 sTitleMap = unmodifiableMap(map); 77 final Map<Integer, Integer> map = new ArrayMap<>(); 86 map.put(PERMISSION_NEARBY_DEVICE_STREAMING, in map.put() 90 sSummaryMap = unmodifiableMap(map); 95 final Map<Integer, Integer> map = new ArrayMap<>(); 100 map.put(PERMISSION_SMS, R.drawable.ic_permission_sms); in map.put() 104 map.put(PERMISSION_NEARBY_DEVICE_STREAMING, in map.put() [all …]
|
/aosp14/frameworks/base/core/jni/ |
H A D | android_view_KeyCharacterMap.cpp | 109 if (!parcel || !map) { in nativeWriteToParcel() 113 if (!map->getMap()) { in nativeWriteToParcel() 123 delete map; in nativeDispose() 130 if (!map || !map->getMap()) { in nativeGetCharacter() 139 if (!map || !map->getMap()) { in nativeGetFallbackAction() 157 if (!map || !map->getMap()) { in nativeGetNumber() 167 if (!map || !map->getMap()) { in nativeGetMatch() 186 if (!map || !map->getMap()) { in nativeGetDisplayLabel() 195 if (!map || !map->getMap()) { in nativeGetKeyboardType() 204 if (!map || !map->getMap()) { in nativeGetEvents() [all …]
|
/aosp14/frameworks/base/apct-tests/perftests/core/src/android/libcore/ |
H A D | HashedCollectionsPerfTest.java | 43 map.put("hello", "world"); in timeHashMapGet() 46 map.get("hello"); in timeHashMapGet() 53 synchronized (map) { in timeHashMapGet_Synchronized() 58 synchronized (map) { in timeHashMapGet_Synchronized() 59 map.get("hello"); in timeHashMapGet_Synchronized() 67 map.put("hello", "world"); in timeHashtableGet() 70 map.get("hello"); in timeHashtableGet() 77 map.put("hello", "world"); in timeLinkedHashMapGet() 80 map.get("hello"); in timeLinkedHashMapGet() 87 map.put("hello", "world"); in timeConcurrentHashMapGet() [all …]
|
/aosp14/frameworks/base/packages/InputDevices/res/raw/ |
H A D | keyboard_layout_english_us_dvorak.kcm | 28 map key 19 P 29 map key 20 Y 30 map key 21 F 31 map key 22 G 32 map key 23 C 33 map key 24 R 34 map key 25 L 37 map key 30 A 38 map key 31 O 39 map key 32 E [all …]
|
H A D | keyboard_layout_english_us_workman.kcm | 23 map key 17 D 24 map key 18 R 25 map key 19 W 26 map key 20 B 27 map key 21 J 28 map key 22 F 29 map key 23 U 30 map key 24 P 32 map key 32 H 33 map key 33 T [all …]
|
H A D | keyboard_layout_english_us_colemak.kcm | 23 map key 18 F 24 map key 19 P 25 map key 20 G 26 map key 21 J 27 map key 22 L 28 map key 23 U 29 map key 24 Y 31 map key 31 R 32 map key 32 S 33 map key 33 T [all …]
|
/aosp14/frameworks/base/services/core/java/com/android/server/vcn/util/ |
H A D | MtuUtils.java | 73 final Map<Integer, Integer> map = new ArrayMap<>(); 74 map.put(INTEGRITY_ALGORITHM_NONE, 0); in map.put() 75 map.put(INTEGRITY_ALGORITHM_HMAC_SHA1_96, 12); in map.put() 76 map.put(INTEGRITY_ALGORITHM_AES_XCBC_96, 12); in map.put() 77 map.put(INTEGRITY_ALGORITHM_HMAC_SHA2_256_128, 32); in map.put() 78 map.put(INTEGRITY_ALGORITHM_HMAC_SHA2_384_192, 48); in map.put() 79 map.put(INTEGRITY_ALGORITHM_HMAC_SHA2_512_256, 64); in map.put() 80 map.put(INTEGRITY_ALGORITHM_AES_CMAC_96, 12); in map.put() 82 AUTH_ALGORITHM_OVERHEAD = unmodifiableMap(map); 89 final Map<Integer, Integer> map = new ArrayMap<>(); [all …]
|
/aosp14/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/ |
H A D | AbUpdateInstaller.java | 65 map.put( in buildErrorCodesMap() 68 map.put( in buildErrorCodesMap() 71 map.put( in buildErrorCodesMap() 76 map.put( in buildErrorCodesMap() 79 map.put( in buildErrorCodesMap() 82 map.put( in buildErrorCodesMap() 85 map.put( in buildErrorCodesMap() 89 map.put( in buildErrorCodesMap() 94 map.put( in buildErrorCodesMap() 97 map.put( in buildErrorCodesMap() [all …]
|
/aosp14/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/inputmethod/ |
H A D | InputMethodAndSubtypeUtilCompatTest.java | 117 HashMap<String, HashSet<String>> map = new HashMap<>(); in buildInputMethodsAndSubtypesString_EmptyInput() local 118 assertThat(map).isEmpty(); in buildInputMethodsAndSubtypesString_EmptyInput() 124 map.put("ime0", new HashSet<>()); in buildInputMethodsAndSubtypesString_SingleIme() 132 map.put("ime0", asHashSet("subtype0")); in buildInputMethodsAndSubtypesString_SingleImeSingleSubtype() 140 map.put("ime0", asHashSet("subtype0", "subtype1")); in buildInputMethodsAndSubtypesString_SingleImeMultipleSubtypes() 152 map.put("ime0", EMPTY_STRING_SET); in buildInputMethodsAndSubtypesString_MultipleImesNoSubtypes() 153 map.put("ime1", EMPTY_STRING_SET); in buildInputMethodsAndSubtypesString_MultipleImesNoSubtypes() 165 map.put("ime0", asHashSet("subtype0", "subtype1")); in buildInputMethodsAndSubtypesString_MultipleImesWithAndWithoutSubtypes() 166 map.put("ime1", EMPTY_STRING_SET); in buildInputMethodsAndSubtypesString_MultipleImesWithAndWithoutSubtypes() 179 map.put("ime0", asHashSet("subtype0", "subtype1")); in buildInputMethodsAndSubtypesString_MultipleImesWithSubtypes() [all …]
|
H A D | InputMethodAndSubtypeUtilTest.java | 115 HashMap<String, HashSet<String>> map = new HashMap<>(); in buildInputMethodsAndSubtypesString_EmptyInput() local 116 assertThat(map).isEmpty(); in buildInputMethodsAndSubtypesString_EmptyInput() 122 map.put("ime0", new HashSet<>()); in buildInputMethodsAndSubtypesString_SingleIme() 130 map.put("ime0", asHashSet("subtype0")); in buildInputMethodsAndSubtypesString_SingleImeSingleSubtype() 138 map.put("ime0", asHashSet("subtype0", "subtype1")); in buildInputMethodsAndSubtypesString_SingleImeMultipleSubtypes() 150 map.put("ime0", EMPTY_STRING_SET); in buildInputMethodsAndSubtypesString_MultipleImesNoSubtypes() 151 map.put("ime1", EMPTY_STRING_SET); in buildInputMethodsAndSubtypesString_MultipleImesNoSubtypes() 163 map.put("ime0", asHashSet("subtype0", "subtype1")); in buildInputMethodsAndSubtypesString_MultipleImesWithAndWithoutSubtypes() 164 map.put("ime1", EMPTY_STRING_SET); in buildInputMethodsAndSubtypesString_MultipleImesWithAndWithoutSubtypes() 177 map.put("ime0", asHashSet("subtype0", "subtype1")); in buildInputMethodsAndSubtypesString_MultipleImesWithSubtypes() [all …]
|
/aosp14/frameworks/base/core/java/android/os/health/ |
H A D | HealthStatsWriter.java | 123 if (map == null) { in addStats() 126 map.put(name, value); in addStats() 138 if (map == null) { in addTimers() 141 map.put(name, value); in addTimers() 151 if (map == null) { in addMeasurements() 154 map.put(name, value); in addMeasurements() 256 final int N = map.size(); in writeHealthStatsWriterMap() 259 out.writeString(map.keyAt(i)); in writeHealthStatsWriterMap() 268 ArrayMap<String,T> map) { in writeParcelableMap() argument 269 final int N = map.size(); in writeParcelableMap() [all …]
|
/aosp14/frameworks/base/packages/SettingsLib/IllustrationPreference/src/com/android/settingslib/widget/ |
H A D | LottieColorUtils.java | 40 HashMap<String, Integer> map = new HashMap<>(); 41 map.put( 44 map.put( 47 map.put( 50 map.put( 53 map.put( 56 map.put( 59 map.put( 62 map.put( 65 map.put( [all …]
|
/aosp14/frameworks/base/apct-tests/perftests/core/src/android/util/ |
H A D | ArrayMapPerfTest.java | 49 ArrayMap<String, Integer> map = new ArrayMap<>(); in testForEach_Small() local 51 map.put(Integer.toString(j), j); in testForEach_Small() 53 map.forEach(consumer); in testForEach_Small() 65 ArrayMap<String, Integer> map = new ArrayMap<>(); in testForEach_Large() local 67 map.put(Integer.toString(j), j); in testForEach_Large() 69 map.forEach(consumer); in testForEach_Large() 80 ArrayMap<Integer, Integer> map = new ArrayMap<>(); in testReplaceAll_Small() local 82 map.put(j, j); in testReplaceAll_Small() 84 map.replaceAll(function); in testReplaceAll_Small() 97 map.put(j, j); in testReplaceAll_Large() [all …]
|
/aosp14/frameworks/base/tools/aapt2/format/binary/ |
H A D | BinaryResourceParser.h | 69 const android::ResTable_map_entry* map); 73 const android::ResTable_map_entry* map); 77 const android::ResTable_map_entry* map); 81 const android::ResTable_map_entry* map); 85 const android::ResTable_map_entry* map); 119 std::map<ResourceId, ResourceName> id_index_; 135 inline const ResTable_map* begin(const ResTable_map_entry* map) { in begin() argument 136 return (const ResTable_map*)((const uint8_t*)map + android::util::DeviceToHost32(map->size)); in begin() 139 inline const ResTable_map* end(const ResTable_map_entry* map) { in end() argument 140 return begin(map) + android::util::DeviceToHost32(map->count); in end()
|
/aosp14/frameworks/base/core/tests/coretests/src/android/util/ |
H A D | ArrayMapTest.java | 31 ArrayMap<String, String> map = new ArrayMap<>(); field in ArrayMapTest 49 while (map != null) { in testConcurrentModificationException() 51 map.put(String.format("key %d", i++), "B_DONT_DO_THAT"); in testConcurrentModificationException() 60 + " size=" + (map == null ? "??" : String.valueOf(map.size())) + "]"); in testConcurrentModificationException() 70 map.clear(); in testConcurrentModificationException() 82 + i + " size=" + map.size() + "]"); in testConcurrentModificationException() 85 map = null; // will stop other thread in testConcurrentModificationException() 96 map.put(String.format("key %d", i++), "B_DONT_DO_THAT"); in testNonConcurrentAccesses() 101 map.clear(); in testNonConcurrentAccesses()
|
H A D | LongSparseLongArrayTest.java | 80 final HashMap<Long, Long> map = new HashMap<Long, Long>(); in testFuzz() local 87 map.put(key, value); in testFuzz() 90 if (r.nextBoolean() && map.size() > 0) { in testFuzz() 91 final int index = r.nextInt(map.size()); in testFuzz() 92 final long key = getKeyAtIndex(map, index); in testFuzz() 93 map.remove(key); in testFuzz() 98 Log.d(TAG, "verifying a map with " + map.size() + " entries"); in testFuzz() 100 for (Map.Entry<Long, Long> e : map.entrySet()) { in testFuzz() 107 private static <E> E getKeyAtIndex(Map<E, ?> map, int index) { in getKeyAtIndex() argument 108 final Iterator<E> keys = map.keySet().iterator(); in getKeyAtIndex()
|
/aosp14/frameworks/base/core/java/android/hardware/radio/ |
H A D | Utils.java | 37 if (map == null) { in writeStringMap() 41 dest.writeInt(map.size()); in writeStringMap() 42 for (Map.Entry<String, String> entry : map.entrySet()) { in writeStringMap() 50 Map<String, String> map = new HashMap<>(size); in readStringMap() local 54 map.put(key, value); in readStringMap() 56 return map; in readStringMap() 60 if (map == null) { in writeStringIntMap() 64 dest.writeInt(map.size()); in writeStringIntMap() 73 Map<String, Integer> map = new HashMap<>(size); in readStringIntMap() local 77 map.put(key, value); in readStringIntMap() [all …]
|
/aosp14/system/core/libcutils/include/cutils/ |
H A D | hashmap.h | 50 void hashmapFree(Hashmap* map); 65 void* hashmapPut(Hashmap* map, void* key, void* value); 71 void* hashmapGet(Hashmap* map, void* key); 77 void* hashmapRemove(Hashmap* map, void* key); 83 void hashmapForEach(Hashmap* map, bool (*callback)(void* key, void* value, void* context), 93 void hashmapLock(Hashmap* map); 98 void hashmapUnlock(Hashmap* map);
|
/aosp14/system/core/libcutils/include_outside_system/cutils/ |
H A D | hashmap.h | 50 void hashmapFree(Hashmap* map); 65 void* hashmapPut(Hashmap* map, void* key, void* value); 71 void* hashmapGet(Hashmap* map, void* key); 77 void* hashmapRemove(Hashmap* map, void* key); 83 void hashmapForEach(Hashmap* map, bool (*callback)(void* key, void* value, void* context), 93 void hashmapLock(Hashmap* map); 98 void hashmapUnlock(Hashmap* map);
|
/aosp14/frameworks/base/tools/fonts/ |
H A D | font-scaling-array-generator.js | 83 function map(value, inputMin, inputMax, outputMin, outputMax) { function 114 const interpolationProgress = map(scale, startTargetScale, endTargetScale, 0, 1); 116 return commonSpSizes.map((sp, i) => { 132 coeff1 = map(scale, 1, 2, 2, 8); 153 .map(scale => { 160 .map(scaleArray => { 178 const itemsFromSp = currentScaleArray.items.map(d => d.fromSp) 179 .map(formatDigit) 181 const itemsToDp = currentScaleArray.items.map(d => d.toDp) 182 .map(formatDigit)
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/controls/management/ |
H A D | AllModel.kt | 91 val map = list.groupByTo(OrderedMap(ArrayMap<CharSequence, MutableList<ControlStatus>>())) { regex 96 for (zoneName in map.orderedKeys) { 97 val values = map.getValue(zoneName).asSequence().map { ControlStatusWrapper(it) } 107 if (map.size != 1) { 115 private class OrderedMap<K, V>(private val map: MutableMap<K, V>) : MutableMap<K, V> by map { 120 if (key !in map) { 123 return map.put(key, value) 128 map.clear() 132 val removed = map.remove(key)
|
/aosp14/frameworks/base/services/companion/java/com/android/server/companion/ |
H A D | MetricUtils.java | 48 final Map<String, Integer> map = new ArrayMap<>(); 49 map.put(null, CDM_ASSOCIATION_ACTION__DEVICE_PROFILE__DEVICE_PROFILE_NULL); in map.put() 50 map.put( in map.put() 54 map.put( in map.put() 58 map.put( in map.put() 62 map.put( in map.put() 66 map.put( in map.put() 70 map.put( in map.put() 75 METRIC_DEVICE_PROFILE = unmodifiableMap(map);
|