/frameworks/native/libs/ftl/ |
D | small_map_test.cpp | 34 ftl::SmallMap<int, std::string, 3> map; in TEST() local 35 EXPECT_TRUE(map.empty()); in TEST() 36 EXPECT_FALSE(map.dynamic()); in TEST() 38 map = ftl::init::map<int, std::string>(123, "abc")(-1)(42, 3u, '?'); in TEST() 39 EXPECT_EQ(map.size(), 3u); in TEST() 40 EXPECT_FALSE(map.dynamic()); in TEST() 42 EXPECT_TRUE(map.contains(123)); in TEST() 44 EXPECT_EQ(map.get(42).transform([](const std::string& s) { return s.size(); }), 3u); in TEST() 46 const auto opt = map.get(-1); in TEST() 53 map.emplace_or_replace(0, "vanilla", 2u, 3u); in TEST() [all …]
|
D | algorithm_test.cpp | 44 const ftl::SmallMap map = ftl::init::map<int, ftl::StaticVector<std::string_view, 3>>( in TEST() local 47 using Map = decltype(map); in TEST() 49 EXPECT_EQ(14, ftl::find_if(map, [](const auto& pair) { in TEST() 53 const auto opt = ftl::find_if(map, [](const auto& pair) { in TEST() 64 const ftl::SmallMap map = ftl::init::map(13, "tiramisu"sv)(14, "upside-down cake"sv); in TEST() local 66 map.get(20).or_else(ftl::static_ref<std::string_view>([] { return "???"sv; }))->get()); in TEST() 68 using Map = decltype(map); in TEST() 71 ftl::find_if(map, [](const auto& pair) { return pair.second.front() == 's'; }) in TEST()
|
/frameworks/base/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/ |
D | CompanionDeviceResources.java | 65 final Map<Integer, Integer> map = new ArrayMap<>(); 66 map.put(PERMISSION_NOTIFICATION_LISTENER_ACCESS, R.string.permission_notifications); in map.put() 67 map.put(PERMISSION_STORAGE, R.string.permission_storage); in map.put() 68 map.put(PERMISSION_APP_STREAMING, R.string.permission_app_streaming); in map.put() 69 map.put(PERMISSION_PHONE, R.string.permission_phone); in map.put() 70 map.put(PERMISSION_SMS, R.string.permission_sms); in map.put() 71 map.put(PERMISSION_CONTACTS, R.string.permission_contacts); in map.put() 72 map.put(PERMISSION_CALENDAR, R.string.permission_calendar); in map.put() 73 map.put(PERMISSION_NEARBY_DEVICES, R.string.permission_nearby_devices); in map.put() 74 map.put(PERMISSION_NEARBY_DEVICE_STREAMING, R.string.permission_nearby_device_streaming); in map.put() [all …]
|
/frameworks/base/libs/androidfw/tests/ |
D | Generic_bench.cpp | 28 Map map; in prepare_map() local 31 map.emplace(i, vec); in prepare_map() 33 return map; in prepare_map() 37 auto map = prepare_map<>(); in BM_hashmap_emplace_same() local 38 auto val = map.size() - 1; in BM_hashmap_emplace_same() 41 benchmark::DoNotOptimize(map.emplace(val, vec)); in BM_hashmap_emplace_same() 46 auto map = prepare_map(); in BM_hashmap_try_emplace_same() local 47 auto val = map.size() - 1; in BM_hashmap_try_emplace_same() 49 benchmark::DoNotOptimize(map.try_emplace(val)); in BM_hashmap_try_emplace_same() 54 auto map = prepare_map<>(); in BM_hashmap_find() local [all …]
|
/frameworks/av/services/mediametrics/ |
D | AudioTypes.cpp | 28 static std::unordered_map<std::string, int32_t> map{ in getAudioCallerNameMap() local 39 return map; in getAudioCallerNameMap() 50 static std::unordered_map<std::string, int64_t> map{ in getAudioDeviceInMap() local 84 return map; in getAudioDeviceInMap() 95 static std::unordered_map<std::string, int64_t> map{ in getAudioDeviceOutMap() local 135 return map; in getAudioDeviceOutMap() 141 static std::unordered_map<std::string, int32_t> map{ in getAudioDeviceOutCompactMap() local 179 return map; in getAudioDeviceOutCompactMap() 186 static std::unordered_map<std::string, int32_t> map{ in getAudioDeviceInfoTypeMap() local 223 return map; in getAudioDeviceInfoTypeMap() [all …]
|
/frameworks/av/media/codec2/sfplugin/utils/ |
D | Codec2Mapper.h | 60 static bool map(C2Config::bitrate_mode_t, int32_t*); 61 static bool map(int32_t, C2Config::bitrate_mode_t*); 64 static bool map(C2Config::pcm_encoding_t, int32_t*); 65 static bool map(int32_t, C2Config::pcm_encoding_t*); 68 static bool map(C2Config::picture_type_t, int32_t*); 69 static bool map(int32_t, C2Config::picture_type_t*); 72 static bool map(C2Color::range_t, int32_t*); 73 static bool map(int32_t, C2Color::range_t*); 74 static bool map(C2Color::primaries_t, C2Color::matrix_t, int32_t*); 75 static bool map(int32_t, C2Color::primaries_t*, C2Color::matrix_t*); [all …]
|
D | Codec2Mapper.cpp | 517 return sAacProfiles.map(from, to); in simpleMap() 520 return sAacProfiles.map(from, to); in simpleMap() 530 return sAvcLevels.map(from, to); in simpleMap() 533 return sAvcLevels.map(from, to); in simpleMap() 536 return sAvcProfiles.map(from, to); in simpleMap() 539 return sAvcProfiles.map(from, to); in simpleMap() 545 return sDolbyVisionLevels.map(from, to); in simpleMap() 548 return sDolbyVisionLevels.map(from, to); in simpleMap() 551 return sDolbyVisionProfiles.map(from, to); in simpleMap() 554 return sDolbyVisionProfiles.map(from, to); in simpleMap() [all …]
|
/frameworks/base/core/jni/ |
D | android_view_KeyCharacterMap.cpp | 51 NativeKeyCharacterMap(int32_t deviceId, std::unique_ptr<KeyCharacterMap> map) in NativeKeyCharacterMap() argument 52 : mDeviceId(deviceId), mMap(std::move(map)) {} in NativeKeyCharacterMap() 104 NativeKeyCharacterMap* map = new NativeKeyCharacterMap(deviceId, std::move(kcm)); in nativeReadFromParcel() local 105 return reinterpret_cast<jlong>(map); in nativeReadFromParcel() 109 NativeKeyCharacterMap* map = reinterpret_cast<NativeKeyCharacterMap*>(ptr); in nativeWriteToParcel() local 111 if (!parcel || !map) { in nativeWriteToParcel() 114 parcel->writeInt32(map->getDeviceId()); in nativeWriteToParcel() 115 if (!map->getMap()) { in nativeWriteToParcel() 120 map->getMap()->writeToParcel(parcel); in nativeWriteToParcel() 124 NativeKeyCharacterMap* map = reinterpret_cast<NativeKeyCharacterMap*>(ptr); in nativeDispose() local [all …]
|
/frameworks/base/services/permission/java/com/android/server/permission/access/immutable/ |
D | IndexedMap.kt | 22 sealed class IndexedMap<K, V>(internal val map: ArrayMap<K, V>) : constant in com.android.server.permission.access.immutable.IndexedMap 25 get() = map.size 27 fun isEmpty(): Boolean = map.isEmpty() in isEmpty() 29 operator fun contains(key: K): Boolean = map.containsKey(key) in isEmpty() 31 @Suppress("ReplaceGetOrSet") operator fun get(key: K): V? = map.get(key) in isEmpty() 33 fun indexOfKey(key: K): Int = map.indexOfKey(key) in isEmpty() 35 fun keyAt(index: Int): K = map.keyAt(index) in isEmpty() 37 fun valueAt(index: Int): V = map.valueAt(index) in isEmpty() 41 override fun toString(): String = map.toString() in isEmpty() 45 class MutableIndexedMap<K, V>(map: ArrayMap<K, V> = ArrayMap()) : IndexedMap<K, V>(map) { in isEmpty() [all …]
|
D | IndexedReferenceMap.kt | 27 internal val map: ArrayMap<K, MutableReference<I, M>> constant in com.android.server.permission.access.immutable.IndexedReferenceMap 30 get() = map.size 32 fun isEmpty(): Boolean = map.isEmpty() in isEmpty() 34 operator fun contains(key: K): Boolean = map.containsKey(key) in isEmpty() 36 @Suppress("ReplaceGetOrSet") operator fun get(key: K): I? = map.get(key)?.get() in isEmpty() 38 fun indexOfKey(key: K): Int = map.indexOfKey(key) in isEmpty() 40 fun keyAt(index: Int): K = map.keyAt(index) in isEmpty() 42 fun valueAt(index: Int): I = map.valueAt(index).get() in isEmpty() 46 override fun toString(): String = map.toString() in isEmpty() 55 map: ArrayMap<K, MutableReference<I, M>> = ArrayMap() in isEmpty() [all …]
|
/frameworks/base/apct-tests/perftests/core/src/android/libcore/ |
D | HashedCollectionsPerfTest.java | 42 HashMap<String, String> map = new HashMap<String, String>(); in timeHashMapGet() local 43 map.put("hello", "world"); in timeHashMapGet() 46 map.get("hello"); in timeHashMapGet() 52 HashMap<String, String> map = new HashMap<String, String>(); in timeHashMapGet_Synchronized() local 53 synchronized (map) { in timeHashMapGet_Synchronized() 54 map.put("hello", "world"); in timeHashMapGet_Synchronized() 58 synchronized (map) { in timeHashMapGet_Synchronized() 59 map.get("hello"); in timeHashMapGet_Synchronized() 66 Hashtable<String, String> map = new Hashtable<String, String>(); in timeHashtableGet() local 67 map.put("hello", "world"); in timeHashtableGet() [all …]
|
/frameworks/base/core/java/com/android/internal/widget/remotecompose/core/ |
D | Operations.java | 110 public static IntMap<CompanionOperation> map = new IntMap<>(); field in Operations 113 map.put(HEADER, Header.COMPANION); in map.put() 114 map.put(DRAW_BITMAP_INT, DrawBitmapInt.COMPANION); in map.put() 115 map.put(DATA_BITMAP, BitmapData.COMPANION); in map.put() 116 map.put(DATA_TEXT, TextData.COMPANION); in map.put() 117 map.put(THEME, Theme.COMPANION); in map.put() 118 map.put(CLICK_AREA, ClickArea.COMPANION); in map.put() 119 map.put(ROOT_CONTENT_BEHAVIOR, RootContentBehavior.COMPANION); in map.put() 120 map.put(ROOT_CONTENT_DESCRIPTION, RootContentDescription.COMPANION); in map.put() 122 map.put(DRAW_ARC, DrawArc.COMPANION); in map.put() [all …]
|
/frameworks/base/packages/InputDevices/res/raw/ |
D | keyboard_layout_english_us_dvorak.kcm | 23 map key 12 LEFT_BRACKET 24 map key 13 RIGHT_BRACKET 25 map key 16 APOSTROPHE 26 map key 17 COMMA 27 map key 18 PERIOD 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 [all …]
|
/frameworks/base/services/core/java/com/android/server/vcn/util/ |
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 …]
|
/frameworks/base/packages/SettingsLib/IllustrationPreference/src/com/android/settingslib/widget/ |
D | LottieColorUtils.java | 42 HashMap<String, Integer> map = new HashMap<>(); 43 map.put( 46 map.put( 49 map.put( 52 map.put( 55 map.put( 58 map.put( 61 map.put( 64 map.put( 67 map.put( [all …]
|
/frameworks/av/drm/libdrmframework/plugins/common/util/include/ |
D | SessionMap.h | 53 map.add(key, value); in addValue() 78 return map.size(); in getSize() 92 if (map.size() > index) { in getValueAt() 93 value = map.valueAt(index); in getValueAt() 107 map.removeItem(key); in removeValue() 126 map = objectCopy.map; 131 KeyedVector<int, TValue> map; 152 int size = map.size(); in destroyMap() 155 deleteValue(map.valueAt(i)); in destroyMap() 157 map.clear(); in destroyMap() [all …]
|
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/ |
D | AbUpdateInstaller.java | 64 Map<Integer, Integer> map = new HashMap<>(); in buildErrorCodesMap() local 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() [all …]
|
/frameworks/ex/camera2/extensions/service_based_sample/extensions_service/src/com/android/oemextensions/ |
D | AdvancedExtenderImplStub.java | 156 Map<CaptureRequest.Key, Object> map = new HashMap<>(); in getSupportedCaptureRequestKeys() local 157 map.put(CaptureRequest.CONTROL_ZOOM_RATIO, in getSupportedCaptureRequestKeys() 159 map.put(CaptureRequest.SCALER_CROP_REGION, in getSupportedCaptureRequestKeys() 161 map.put(CaptureRequest.CONTROL_AE_REGIONS, in getSupportedCaptureRequestKeys() 163 map.put(CaptureRequest.CONTROL_AWB_REGIONS, in getSupportedCaptureRequestKeys() 165 map.put(CaptureRequest.JPEG_QUALITY, in getSupportedCaptureRequestKeys() 167 map.put(CaptureRequest.JPEG_ORIENTATION, in getSupportedCaptureRequestKeys() 170 map.put(CaptureRequest.CONTROL_AF_TRIGGER, in getSupportedCaptureRequestKeys() 172 map.put(CaptureRequest.CONTROL_AF_MODE, in getSupportedCaptureRequestKeys() 174 map.put(CaptureRequest.CONTROL_AF_REGIONS, in getSupportedCaptureRequestKeys() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/inputmethod/ |
D | InputMethodAndSubtypeUtilTest.java | 115 HashMap<String, HashSet<String>> map = new HashMap<>(); in buildInputMethodsAndSubtypesString_EmptyInput() local 116 assertThat(map).isEmpty(); in buildInputMethodsAndSubtypesString_EmptyInput() 121 HashMap<String, HashSet<String>> map = new HashMap<>(); in buildInputMethodsAndSubtypesString_SingleIme() local 122 map.put("ime0", new HashSet<>()); in buildInputMethodsAndSubtypesString_SingleIme() 123 String result = InputMethodAndSubtypeUtil.buildInputMethodsAndSubtypesString(map); in buildInputMethodsAndSubtypesString_SingleIme() 129 HashMap<String, HashSet<String>> map = new HashMap<>(); in buildInputMethodsAndSubtypesString_SingleImeSingleSubtype() local 130 map.put("ime0", asHashSet("subtype0")); in buildInputMethodsAndSubtypesString_SingleImeSingleSubtype() 131 String result = InputMethodAndSubtypeUtil.buildInputMethodsAndSubtypesString(map); in buildInputMethodsAndSubtypesString_SingleImeSingleSubtype() 137 HashMap<String, HashSet<String>> map = new HashMap<>(); in buildInputMethodsAndSubtypesString_SingleImeMultipleSubtypes() local 138 map.put("ime0", asHashSet("subtype0", "subtype1")); in buildInputMethodsAndSubtypesString_SingleImeMultipleSubtypes() [all …]
|
D | InputMethodAndSubtypeUtilCompatTest.java | 117 HashMap<String, HashSet<String>> map = new HashMap<>(); in buildInputMethodsAndSubtypesString_EmptyInput() local 118 assertThat(map).isEmpty(); in buildInputMethodsAndSubtypesString_EmptyInput() 123 HashMap<String, HashSet<String>> map = new HashMap<>(); in buildInputMethodsAndSubtypesString_SingleIme() local 124 map.put("ime0", new HashSet<>()); in buildInputMethodsAndSubtypesString_SingleIme() 125 String result = InputMethodAndSubtypeUtilCompat.buildInputMethodsAndSubtypesString(map); in buildInputMethodsAndSubtypesString_SingleIme() 131 HashMap<String, HashSet<String>> map = new HashMap<>(); in buildInputMethodsAndSubtypesString_SingleImeSingleSubtype() local 132 map.put("ime0", asHashSet("subtype0")); in buildInputMethodsAndSubtypesString_SingleImeSingleSubtype() 133 String result = InputMethodAndSubtypeUtilCompat.buildInputMethodsAndSubtypesString(map); in buildInputMethodsAndSubtypesString_SingleImeSingleSubtype() 139 HashMap<String, HashSet<String>> map = new HashMap<>(); in buildInputMethodsAndSubtypesString_SingleImeMultipleSubtypes() local 140 map.put("ime0", asHashSet("subtype0", "subtype1")); in buildInputMethodsAndSubtypesString_SingleImeMultipleSubtypes() [all …]
|
/frameworks/base/core/java/android/os/health/ |
D | HealthStatsWriter.java | 122 ArrayMap<String,HealthStatsWriter> map = mStatsValues[index]; in addStats() local 123 if (map == null) { in addStats() 124 map = mStatsValues[index] = new ArrayMap<String,HealthStatsWriter>(1); in addStats() 126 map.put(name, value); in addStats() 137 ArrayMap<String,TimerStat> map = mTimersValues[index]; in addTimers() local 138 if (map == null) { in addTimers() 139 map = mTimersValues[index] = new ArrayMap<String,TimerStat>(1); in addTimers() 141 map.put(name, value); in addTimers() 150 ArrayMap<String,Long> map = mMeasurementsValues[index]; in addMeasurements() local 151 if (map == null) { in addMeasurements() [all …]
|
/frameworks/opt/net/ims/src/java/com/android/ims/rcs/uce/presence/publish/ |
D | PublishServiceDescTracker.java | 56 ArrayMap<ServiceDescription, Set<String>> map = new ArrayMap<>(23); 57 map.put(ServiceDescription.SERVICE_DESCRIPTION_CHAT_IM, in map.put() 59 map.put(ServiceDescription.SERVICE_DESCRIPTION_CHAT_SESSION, in map.put() 61 map.put(ServiceDescription.SERVICE_DESCRIPTION_FT, in map.put() 63 map.put(ServiceDescription.SERVICE_DESCRIPTION_FT_SMS, in map.put() 65 map.put(ServiceDescription.SERVICE_DESCRIPTION_PRESENCE, in map.put() 68 map.put(ServiceDescription.SERVICE_DESCRIPTION_MMTEL_VOICE, in map.put() 70 map.put(ServiceDescription.SERVICE_DESCRIPTION_MMTEL_VOICE_VIDEO, new ArraySet<>( in map.put() 72 map.put(ServiceDescription.SERVICE_DESCRIPTION_GEOPUSH, in map.put() 74 map.put(ServiceDescription.SERVICE_DESCRIPTION_GEOPUSH_SMS, in map.put() [all …]
|
/frameworks/base/apct-tests/perftests/core/src/android/util/ |
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() 95 ArrayMap<Integer, Integer> map = new ArrayMap<>(); in testReplaceAll_Large() local [all …]
|
/frameworks/base/tools/aapt2/format/binary/ |
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()
|
/frameworks/base/core/tests/coretests/src/android/util/ |
D | ArrayMapTest.java | 38 ArrayMap<String, String> map = new ArrayMap<>(); field in ArrayMapTest 60 while (map != null) { in testConcurrentModificationException() 62 map.put(String.format("key %d", i++), "B_DONT_DO_THAT"); in testConcurrentModificationException() 71 + " size=" + (map == null ? "??" : String.valueOf(map.size())) + "]"); in testConcurrentModificationException() 81 map.clear(); in testConcurrentModificationException() 93 + i + " size=" + map.size() + "]"); in testConcurrentModificationException() 96 map = null; // will stop other thread in testConcurrentModificationException() 107 map.put(String.format("key %d", i++), "B_DONT_DO_THAT"); in testNonConcurrentAccesses() 112 map.clear(); in testNonConcurrentAccesses()
|