Home
last modified time | relevance | path

Searched refs:attributeMap (Results 1 – 19 of 19) sorted by relevance

/packages/inputmethods/LatinIME/native/jni/tests/dictionary/header/
Dheader_read_write_utils_test.cpp44 DictionaryHeaderStructurePolicy::AttributeMap attributeMap; in TEST() local
47 EXPECT_EQ(-1, HeaderReadWriteUtils::readIntAttributeValue(&attributeMap, "", -1)); in TEST()
48 EXPECT_EQ(100, HeaderReadWriteUtils::readIntAttributeValue(&attributeMap, "abc", 100)); in TEST()
50 HeaderReadWriteUtils::setIntAttribute(&attributeMap, "abc", 10); in TEST()
51 EXPECT_EQ(10, HeaderReadWriteUtils::readIntAttributeValue(&attributeMap, "abc", 100)); in TEST()
52 HeaderReadWriteUtils::setIntAttribute(&attributeMap, "abc", 20); in TEST()
53 EXPECT_EQ(20, HeaderReadWriteUtils::readIntAttributeValue(&attributeMap, "abc", 100)); in TEST()
54 HeaderReadWriteUtils::setIntAttribute(&attributeMap, "abcd", 30); in TEST()
55 EXPECT_EQ(30, HeaderReadWriteUtils::readIntAttributeValue(&attributeMap, "abcd", 100)); in TEST()
56 EXPECT_EQ(20, HeaderReadWriteUtils::readIntAttributeValue(&attributeMap, "abc", 100)); in TEST()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/avrcpcontroller/
DTrackInfo.java70 Map<Integer, String> attributeMap = new HashMap<>(); in TrackInfo() local
72 attributeMap.put(attrIds.get(i), attrMap.get(i)); in TrackInfo()
76 mTrackTitle = attributeMap.getOrDefault(MEDIA_ATTRIBUTE_TITLE, UNPOPULATED_ATTRIBUTE); in TrackInfo()
78 mArtistName = attributeMap.getOrDefault(MEDIA_ATTRIBUTE_ARTIST_NAME, UNPOPULATED_ATTRIBUTE); in TrackInfo()
80 mAlbumTitle = attributeMap.getOrDefault(MEDIA_ATTRIBUTE_ALBUM_NAME, UNPOPULATED_ATTRIBUTE); in TrackInfo()
82 attribute = attributeMap.get(MEDIA_ATTRIBUTE_TRACK_NUMBER); in TrackInfo()
85 attribute = attributeMap.get(MEDIA_ATTRIBUTE_TOTAL_TRACK_NUMBER); in TrackInfo()
88 mGenre = attributeMap.getOrDefault(MEDIA_ATTRIBUTE_GENRE, UNPOPULATED_ATTRIBUTE); in TrackInfo()
90 attribute = attributeMap.get(MEDIA_ATTRIBUTE_PLAYING_TIME); in TrackInfo()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/utils/
Ddict_file_writing_utils.cpp43 const DictionaryHeaderStructurePolicy::AttributeMap *const attributeMap) { in createEmptyDictFile() argument
51 filePath, localeAsCodePointVector, attributeMap, formatVersion); in createEmptyDictFile()
56 filePath, localeAsCodePointVector, attributeMap, formatVersion); in createEmptyDictFile()
67 const DictionaryHeaderStructurePolicy::AttributeMap *const attributeMap, in createEmptyV4DictFile() argument
69 HeaderPolicy headerPolicy(formatVersion, localeAsCodePointVector, attributeMap); in createEmptyV4DictFile()
Ddict_file_writing_utils.h36 const DictionaryHeaderStructurePolicy::AttributeMap *const attributeMap);
51 const DictionaryHeaderStructurePolicy::AttributeMap *const attributeMap,
57 const DictionaryHeaderStructurePolicy::AttributeMap *const attributeMap,
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/
DCombinedFormatUtils.java40 public static String formatAttributeMap(final HashMap<String, String> attributeMap) { in formatAttributeMap() argument
43 if (attributeMap.containsKey(DictionaryHeader.DICTIONARY_ID_KEY)) { in formatAttributeMap()
44 builder.append(attributeMap.get(DictionaryHeader.DICTIONARY_ID_KEY)); in formatAttributeMap()
46 for (final String key : attributeMap.keySet()) { in formatAttributeMap()
50 final String value = attributeMap.get(key); in formatAttributeMap()
DBinaryDictionaryUtils.java96 final Locale locale, final Map<String, String> attributeMap) { in createEmptyDictFile() argument
97 final String[] keyArray = new String[attributeMap.size()]; in createEmptyDictFile()
98 final String[] valueArray = new String[attributeMap.size()]; in createEmptyDictFile()
100 for (final String key : attributeMap.keySet()) { in createEmptyDictFile()
102 valueArray[index] = attributeMap.get(key); in createEmptyDictFile()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/
DExpandableBinaryDictionary.java209 HashMap<String, String> attributeMap = new HashMap<>(); in getHeaderAttributeMap() local
211 attributeMap.putAll(mAdditionalAttributeMap); in getHeaderAttributeMap()
213 attributeMap.put(DictionaryHeader.DICTIONARY_ID_KEY, mDictName); in getHeaderAttributeMap()
214 attributeMap.put(DictionaryHeader.DICTIONARY_LOCALE_KEY, mLocale.toString()); in getHeaderAttributeMap()
215 attributeMap.put(DictionaryHeader.DICTIONARY_VERSION_KEY, in getHeaderAttributeMap()
217 return attributeMap; in getHeaderAttributeMap()
682 final Map<String, String> attributeMap) { in clearAndFlushDictionaryWithAdditionalAttributes() argument
683 mAdditionalAttributeMap = attributeMap; in clearAndFlushDictionaryWithAdditionalAttributes()
DBinaryDictionary.java145 final Map<String, String> attributeMap) { in BinaryDictionary() argument
153 final String[] keyArray = new String[attributeMap.size()]; in BinaryDictionary()
154 final String[] valueArray = new String[attributeMap.size()]; in BinaryDictionary()
156 for (final String key : attributeMap.keySet()) { in BinaryDictionary()
158 valueArray[index] = attributeMap.get(key); in BinaryDictionary()
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
DBinaryDictionaryTests.java70 final HashMap<String, String> attributeMap) { in createEmptyDictionaryWithAttributesAndGetFile() argument
73 attributeMap); in createEmptyDictionaryWithAttributesAndGetFile()
83 final HashMap<String, String> attributeMap) throws IOException { in createEmptyVer4DictionaryAndGetFile() argument
89 Locale.ENGLISH, attributeMap)) { in createEmptyVer4DictionaryAndGetFile()
505 final HashMap<String, String> attributeMap = new HashMap<>(); in testRandomOperationsAndFlashWithGC() local
506 attributeMap.put(DictionaryHeader.MAX_UNIGRAM_COUNT_KEY, String.valueOf(maxUnigramCount)); in testRandomOperationsAndFlashWithGC()
507 attributeMap.put(DictionaryHeader.MAX_BIGRAM_COUNT_KEY, String.valueOf(maxBigramCount)); in testRandomOperationsAndFlashWithGC()
519 attributeMap); in testRandomOperationsAndFlashWithGC()
634 final HashMap<String, String> attributeMap = new HashMap<>(); in testUnigramAndBigramCount() local
635 attributeMap.put(DictionaryHeader.MAX_UNIGRAM_COUNT_KEY, String.valueOf(maxUnigramCount)); in testUnigramAndBigramCount()
[all …]
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/
Ddictionary_structure_with_buffer_policy_factory.cpp58 const DictionaryHeaderStructurePolicy::AttributeMap *const attributeMap) { in newPolicyForOnMemoryDict() argument
66 dictFormatVersion, locale, attributeMap); in newPolicyForOnMemoryDict()
72 dictFormatVersion, locale, attributeMap); in newPolicyForOnMemoryDict()
87 const DictionaryHeaderStructurePolicy::AttributeMap *const attributeMap) { in newPolicyForOnMemoryV4Dict() argument
88 HeaderPolicy headerPolicy(formatVersion, locale, attributeMap); in newPolicyForOnMemoryV4Dict()
Ddictionary_structure_with_buffer_policy_factory.h38 const DictionaryHeaderStructurePolicy::AttributeMap *const attributeMap);
47 const DictionaryHeaderStructurePolicy::AttributeMap *const attributeMap);
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/personalization/
DUserHistoryDictionary.java118 final Map<String, String> attributeMap = super.getHeaderAttributeMap(); in getHeaderAttributeMap() local
119 attributeMap.put(DictionaryHeader.USES_FORGETTING_CURVE_KEY, in getHeaderAttributeMap()
121 attributeMap.put(DictionaryHeader.HAS_HISTORICAL_INFO_KEY, in getHeaderAttributeMap()
123 return attributeMap; in getHeaderAttributeMap()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/header/
Dheader_policy.cpp157 DictionaryHeaderStructurePolicy::AttributeMap attributeMap; in createAttributeMapAndReadAllAttributes() local
158 HeaderReadWriteUtils::fetchAllHeaderAttributes(dictBuf, &attributeMap); in createAttributeMapAndReadAllAttributes()
159 return attributeMap; in createAttributeMapAndReadAllAttributes()
Dheader_policy.h62 const DictionaryHeaderStructurePolicy::AttributeMap *const attributeMap) in HeaderPolicy() argument
65 attributeMap)), mSize(0), mAttributeMap(*attributeMap), mLocale(locale), in HeaderPolicy()
Dheader_read_write_utils.h44 const DictionaryHeaderStructurePolicy::AttributeMap *const attributeMap);
Dheader_read_write_utils.cpp65 const AttributeMap *const attributeMap) { in createAndGetDictionaryFlagsUsingAttributeMap() argument
/packages/inputmethods/LatinIME/native/jni/src/utils/
Djni_data_utils.h46 DictionaryHeaderStructurePolicy::AttributeMap attributeMap; in constructAttributeMap() local
68 attributeMap[key] = value; in constructAttributeMap()
70 return attributeMap; in constructAttributeMap()
/packages/inputmethods/LatinIME/native/jni/
Dcom_android_inputmethod_latin_BinaryDictionary.cpp85 DictionaryHeaderStructurePolicy::AttributeMap attributeMap = in latinime_BinaryDictionary_createOnMemory() local
90 formatVersion, localeCodePoints, &attributeMap); in latinime_BinaryDictionary_createOnMemory()
147 const DictionaryHeaderStructurePolicy::AttributeMap *const attributeMap = in latinime_BinaryDictionary_getHeaderInfo() local
149 for (DictionaryHeaderStructurePolicy::AttributeMap::const_iterator it = attributeMap->begin(); in latinime_BinaryDictionary_getHeaderInfo()
150 it != attributeMap->end(); ++it) { in latinime_BinaryDictionary_getHeaderInfo()
Dcom_android_inputmethod_latin_BinaryDictionaryUtils.cpp52 DictionaryHeaderStructurePolicy::AttributeMap attributeMap = in latinime_BinaryDictionaryUtils_createEmptyDictFile() local
56 localeCodePoints, &attributeMap); in latinime_BinaryDictionaryUtils_createEmptyDictFile()