/frameworks/base/services/tests/servicestests/src/com/android/server/inputmethod/ |
D | LocaleUtilsTest.java | 30 import java.util.Locale; 36 private static final LocaleUtils.LocaleExtractor<Locale> sIdentityMapper = source -> source; 40 final ArrayList<Locale> availableLocales = new ArrayList<>(); in testFilterByLanguageEmptyLanguageList() 41 availableLocales.add(Locale.forLanguageTag("en-US")); in testFilterByLanguageEmptyLanguageList() 42 availableLocales.add(Locale.forLanguageTag("fr-CA")); in testFilterByLanguageEmptyLanguageList() 43 availableLocales.add(Locale.forLanguageTag("in")); in testFilterByLanguageEmptyLanguageList() 44 availableLocales.add(Locale.forLanguageTag("ja")); in testFilterByLanguageEmptyLanguageList() 45 availableLocales.add(Locale.forLanguageTag("fil")); in testFilterByLanguageEmptyLanguageList() 49 final ArrayList<Locale> dest = new ArrayList<>(); in testFilterByLanguageEmptyLanguageList() 56 final ArrayList<Locale> availableLocales = new ArrayList<>(); in testFilterDoesNotMatchAnything() [all …]
|
/frameworks/base/core/tests/coretests/src/com/android/internal/inputmethod/ |
D | SubtypeLocaleUtilsTest.java | 27 import java.util.Locale; 32 private static final Locale LOCALE_EN = new Locale("en"); 33 private static final Locale LOCALE_EN_US = new Locale("en", "US"); 34 private static final Locale LOCALE_EN_GB = new Locale("en", "GB"); 35 private static final Locale LOCALE_EN_IN = new Locale("en", "IN"); 36 private static final Locale LOCALE_FIL = new Locale("fil"); 37 private static final Locale LOCALE_FIL_PH = new Locale("fil", "PH"); 38 private static final Locale LOCALE_JA = new Locale("ja"); 39 private static final Locale LOCALE_JA_JP = new Locale("ja", "JP"); 40 private static final Locale LOCALE_TH = new Locale("ht"); [all …]
|
/frameworks/base/tests/TtsTests/src/com/android/speech/tts/ |
D | TtsEnginesTests.java | 6 import java.util.Locale; 17 assertEquals(new Locale("en", "US"), mTtsHelper.parseLocaleString("eng-usa")); in testParseLocaleString() 18 assertEquals(new Locale("en", "US"), mTtsHelper.parseLocaleString("eng-USA")); in testParseLocaleString() 19 assertEquals(new Locale("en", "US"), mTtsHelper.parseLocaleString("en-US")); in testParseLocaleString() 20 assertEquals(new Locale("en", "US"), mTtsHelper.parseLocaleString("en_us")); in testParseLocaleString() 21 assertEquals(new Locale("en", "US"), mTtsHelper.parseLocaleString("eng_US")); in testParseLocaleString() 22 assertEquals(new Locale("en", "US", "foobar"), in testParseLocaleString() 24 assertEquals(new Locale("en", "", "foobar"), mTtsHelper.parseLocaleString("eng__foobar")); in testParseLocaleString() 28 assertEquals(new Locale("en"), mTtsHelper.parseLocaleString("eng")); in testParseLocaleString() 29 assertEquals(new Locale("en","US","var"), mTtsHelper.parseLocaleString("eng-USA-var")); in testParseLocaleString() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/textservices/ |
D | LocaleUtilsTest.java | 29 import java.util.Locale; 34 private static final Locale LOCALE_EN = new Locale("en"); 35 private static final Locale LOCALE_EN_US = new Locale("en", "US"); 36 private static final Locale LOCALE_EN_GB = new Locale("en", "GB"); 37 private static final Locale LOCALE_EN_IN = new Locale("en", "IN"); 38 private static final Locale LOCALE_FIL = new Locale("fil"); 39 private static final Locale LOCALE_FIL_PH = new Locale("fil", "PH"); 40 private static final Locale LOCALE_JA = new Locale("ja"); 41 private static final Locale LOCALE_JA_JP = new Locale("ja", "JP"); 42 private static final Locale LOCALE_TH = new Locale("ht"); [all …]
|
/frameworks/base/services/core/java/com/android/server/textservices/ |
D | LocaleUtils.java | 23 import java.util.Locale; 67 public static ArrayList<Locale> getSuitableLocalesForSpellChecker( in getSuitableLocalesForSpellChecker() 68 @Nullable final Locale systemLocale) { in getSuitableLocalesForSpellChecker() 69 final Locale systemLocaleLanguageCountryVariant; in getSuitableLocalesForSpellChecker() 70 final Locale systemLocaleLanguageCountry; in getSuitableLocalesForSpellChecker() 71 final Locale systemLocaleLanguage; in getSuitableLocalesForSpellChecker() 80 systemLocaleLanguageCountryVariant = new Locale(language, country, variant); in getSuitableLocalesForSpellChecker() 85 systemLocaleLanguageCountry = new Locale(language, country); in getSuitableLocalesForSpellChecker() 90 systemLocaleLanguage = new Locale(language); in getSuitableLocalesForSpellChecker() 100 final ArrayList<Locale> locales = new ArrayList<>(); in getSuitableLocalesForSpellChecker() [all …]
|
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/inputmethod/ |
D | InputMethodSubtypePreferenceTest.java | 33 import java.util.Locale; 41 createPreference("", "en_US", Locale.US), 42 createPreference("E", "en_US", Locale.US), 43 createPreference("Z", "en_US", Locale.US), 45 createPreference("", "en", Locale.US), 46 createPreference("E", "en", Locale.US), 47 createPreference("Z", "en", Locale.US), 49 createPreference("", "ja", Locale.US), 50 createPreference("A", "hi_IN", Locale.US), 51 createPreference("B", "", Locale.US), [all …]
|
/frameworks/base/core/java/android/os/ |
D | LocaleList.java | 31 import java.util.Locale; 38 private final Locale[] mList; 45 private static final Locale[] sEmptyList = new Locale[0]; 54 public Locale get(int index) { in get() 85 public int indexOf(Locale locale) { in indexOf() 100 final Locale[] otherList = ((LocaleList) other).mList; in equals() 160 public LocaleList(@NonNull Locale... list) { in LocaleList() 165 final Locale[] localeList = new Locale[list.length]; in LocaleList() 166 final HashSet<Locale> seenLocales = new HashSet<Locale>(); in LocaleList() 169 final Locale l = list[i]; in LocaleList() [all …]
|
/frameworks/base/core/tests/coretests/src/android/text/format/ |
D | TimeMigrationUtilsTest.java | 31 import java.util.Locale; 41 private Locale mDefaultLocale; 46 mDefaultLocale = Locale.getDefault(); in setUp() 52 Locale.setDefault(mDefaultLocale); in tearDown() 58 Locale.setDefault(Locale.UK); in formatMillisWithFixedFormat_fixes2038Issue() 77 Locale[] locales = new Locale[] { in formatMillisAsDateTime_matchesOldBehavior() 78 Locale.US, in formatMillisAsDateTime_matchesOldBehavior() 79 Locale.UK, in formatMillisAsDateTime_matchesOldBehavior() 80 Locale.FRANCE, in formatMillisAsDateTime_matchesOldBehavior() 81 Locale.JAPAN, in formatMillisAsDateTime_matchesOldBehavior() [all …]
|
D | DateFormatTest.java | 34 import java.util.Locale; 59 assertFalse(DateFormat.is24HourLocale(Locale.US)); in testIs24HourLocale() 60 assertTrue(DateFormat.is24HourLocale(Locale.GERMANY)); in testIs24HourLocale() 65 DateFormatSymbols dfs = DateFormat.getIcuDateFormatSymbols(Locale.US); in testgetIcuDateFormatSymbols() 76 Locale lv = new Locale("lv"); in testGetDateFormatOrder() 83 Locale fa = new Locale("fa"); in testGetDateFormatOrder() 92 Locale enUS = Locale.US; in testGetDateFormatOrder() 99 Locale enGB = Locale.UK; in testGetDateFormatOrder() 135 private static String best(Locale l, String skeleton) { in best()
|
/frameworks/base/core/tests/coretests/src/android/os/ |
D | LocaleListTest.java | 23 import java.util.Locale; 29 ll = new LocaleList(Locale.forLanguageTag("fr"), null); in testConstructor() 32 ll = new LocaleList(Locale.forLanguageTag("fr"), LocaleList.getEmptyLocaleList()); in testConstructor() 35 ll = new LocaleList(Locale.forLanguageTag("fr"), LocaleList.forLanguageTags("fr")); in testConstructor() 38 ll = new LocaleList(Locale.forLanguageTag("fr"), LocaleList.forLanguageTags("de")); in testConstructor() 41 ll = new LocaleList(Locale.forLanguageTag("fr"), LocaleList.forLanguageTags("de,ja")); in testConstructor() 44 ll = new LocaleList(Locale.forLanguageTag("fr"), LocaleList.forLanguageTags("de,fr,ja")); in testConstructor() 47 ll = new LocaleList(Locale.forLanguageTag("fr"), LocaleList.forLanguageTags("de,fr")); in testConstructor() 50 ll = new LocaleList(Locale.forLanguageTag("fr"), LocaleList.forLanguageTags("fr,de")); in testConstructor() 66 final Locale originalLocale = Locale.getDefault(); in testGetDefault_localeSetDefaultCalledButNoChangeNecessary() [all …]
|
/frameworks/base/core/java/com/android/internal/app/ |
D | LocaleHelper.java | 28 import java.util.Locale; 68 public static String toSentenceCase(String str, Locale locale) { in toSentenceCase() 89 public static String normalizeForSearch(String str, Locale locale) { in normalizeForSearch() 99 private static boolean shouldUseDialectName(Locale locale) { in shouldUseDialectName() 115 public static String getDisplayName(Locale locale, Locale displayLocale, boolean sentenceCase) { in getDisplayName() 130 public static String getDisplayName(Locale locale, boolean sentenceCase) { in getDisplayName() 131 return getDisplayName(locale, Locale.getDefault(), sentenceCase); in getDisplayName() 142 public static String getDisplayCountry(Locale locale, Locale displayLocale) { in getDisplayCountry() 161 public static String getDisplayCountry(Locale locale) { in getDisplayCountry() 175 LocaleList locales, Locale displayLocale, @IntRange(from=1) int maxLocales) { in getDisplayLocaleList() [all …]
|
D | LocaleStore.java | 29 import java.util.Locale; 41 private final Locale mLocale; 42 private final Locale mParent; 55 private LocaleInfo(Locale locale) { in LocaleInfo() 66 this(Locale.forLanguageTag(localeId)); in LocaleInfo() 69 private static Locale getParent(Locale locale) { in getParent() 73 return new Locale.Builder() in getParent() 76 .setExtension(Locale.UNICODE_LOCALE_EXTENSION, "") in getParent() 86 public Locale getLocale() { in getLocale() 91 public Locale getParent() { in getParent() [all …]
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/anqp/ |
D | OsuProviderInfoTest.java | 31 import java.util.Locale; 97 Locale defaultLocale = Locale.getDefault(); in getFriendlyNameMatchingDefaultLocale() 98 Locale nonDefaultLocale = Locale.FRENCH; in getFriendlyNameMatchingDefaultLocale() 100 nonDefaultLocale = Locale.ENGLISH; in getFriendlyNameMatchingDefaultLocale() 121 Locale nonDefaultLocale = Locale.FRENCH; in getFriendlyNameNotMatchingDefaultLocale() 122 if (nonDefaultLocale.equals(Locale.getDefault())) { in getFriendlyNameNotMatchingDefaultLocale() 123 nonDefaultLocale = Locale.ENGLISH; in getFriendlyNameNotMatchingDefaultLocale() 157 Locale defaultLocale = Locale.getDefault(); in getServiceDescriptionMatchingDefaultLocale() 158 Locale nonDefaultLocale = Locale.FRENCH; in getServiceDescriptionMatchingDefaultLocale() 160 nonDefaultLocale = Locale.ENGLISH; in getServiceDescriptionMatchingDefaultLocale() [all …]
|
/frameworks/base/core/tests/overlaytests/device/src/com/android/overlaytest/ |
D | OverlayBaseTest.java | 44 import java.util.Locale; 77 private void setLocale(Locale locale) { in setLocale() 350 setLocale(new Locale("sv", "SE")); in testMatrix100000() 357 setLocale(new Locale("sv", "SE")); in testMatrix100001() 364 setLocale(new Locale("sv", "SE")); in testMatrix100010() 371 setLocale(new Locale("sv", "SE")); in testMatrix100011() 378 setLocale(new Locale("sv", "SE")); in testMatrix100100() 385 setLocale(new Locale("sv", "SE")); in testMatrix100101() 392 setLocale(new Locale("sv", "SE")); in testMatrix100110() 399 setLocale(new Locale("sv", "SE")); in testMatrix100111() [all …]
|
/frameworks/base/telephony/java/android/telephony/mbms/ |
D | ServiceInfo.java | 30 import java.util.Locale; 44 private final Map<Locale, String> names; 46 private final List<Locale> locales; 52 public ServiceInfo(Map<Locale, String> newNames, String newClassName, List<Locale> newLocales, in ServiceInfo() argument 83 Locale locale = (java.util.Locale) in.readSerializable(); in ServiceInfo() 92 locales = new ArrayList<Locale>(localesCount); in ServiceInfo() 94 Locale l = (java.util.Locale) in.readSerializable(); in ServiceInfo() 104 Set<Locale> keySet = names.keySet(); in writeToParcel() 106 for (Locale l : keySet) { in writeToParcel() 113 for (Locale l : locales) { in writeToParcel() [all …]
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/util/ |
D | LocaleUtils.java | 29 import java.util.Locale; 47 public static Locale getLocaleFromMcc(Context context, int mcc, String simLanguage) { in getLocaleFromMcc() 53 final Locale locale = getLocaleForLanguageCountry(context, language, country); in getLocaleFromMcc() 75 private static Locale getLocaleForLanguageCountry(Context context, String language, in getLocaleForLanguageCountry() 85 final Locale target = new Locale(language, country); in getLocaleForLanguageCountry() 94 List<Locale> languageMatches = new ArrayList<>(); in getLocaleForLanguageCountry() 96 final Locale l = Locale.forLanguageTag(locale.replace('_', '-')); in getLocaleForLanguageCountry() 121 Locale bestMatch = lookupFallback(target, languageMatches); in getLocaleForLanguageCountry() 179 private static boolean isTranslated(Context context, Locale targetLocale) { in isTranslated() 206 private static Locale lookupFallback(Locale target, List<Locale> candidates) { in lookupFallback() [all …]
|
/frameworks/base/telephony/java/com/android/internal/telephony/gsm/ |
D | SmsCbHeader.java | 26 import java.util.Locale; 43 Locale.GERMAN.getLanguage(), // German 44 Locale.ENGLISH.getLanguage(), // English 45 Locale.ITALIAN.getLanguage(), // Italian 46 Locale.FRENCH.getLanguage(), // French 47 new Locale("es").getLanguage(), // Spanish 48 new Locale("nl").getLanguage(), // Dutch 49 new Locale("sv").getLanguage(), // Swedish 50 new Locale("da").getLanguage(), // Danish 51 new Locale("pt").getLanguage(), // Portuguese [all …]
|
/frameworks/base/core/tests/coretests/src/android/view/textclassifier/ |
D | ModelFileManagerTest.java | 41 import java.util.Locale; 48 private static final Locale DEFAULT_LOCALE = Locale.forLanguageTag("en-US"); 77 Locale.setDefault(DEFAULT_LOCALE); in setup() 120 Locale locale = Locale.forLanguageTag("ja"); in findBestModel_languageDependentModelIsPreferred() 142 Locale locale = Locale.forLanguageTag("ja"); in findBestModel_noMatchedLanguageModel() 191 Collections.singletonList(Locale.forLanguageTag("fr")), "fr", false); in findBestModel_languageIsMoreImportantThanVersion() 196 Collections.singletonList(Locale.forLanguageTag("ja")), "ja", false); in findBestModel_languageIsMoreImportantThanVersion() 213 Collections.singletonList(Locale.forLanguageTag("ja")), "ja", false); in findBestModel_languageIsMoreImportantThanVersion_bestModelComesFirst() 235 Collections.singletonList(Locale.forLanguageTag("ja")), "ja", false); in modelFileEquals() 240 Collections.singletonList(Locale.forLanguageTag("ja")), "ja", false); in modelFileEquals() [all …]
|
/frameworks/minikin/libs/minikin/ |
D | Locale.h | 77 struct Locale { struct 86 Locale() in Locale() function 96 Locale(const StringPiece& buf); 98 bool operator==(const Locale other) const { 104 bool operator!=(const Locale other) const { return !(*this == other); } 122 bool isEqualScript(const Locale& other) const; argument 149 Locale getPartialLocale(SubtagBits bits) const; argument 198 explicit LocaleList(std::vector<Locale>&& locales); argument 207 const Locale& operator[](size_t n) const { return mLocales[n]; } 216 friend struct Locale; // for calcScoreFor [all …]
|
D | Locale.cpp | 158 Locale::Locale(const StringPiece& input) : Locale() { in Locale() function in minikin::Locale 218 void Locale::resolveUnicodeExtension(const char* buf, size_t length) { in resolveUnicodeExtension() 231 LineBreakStyle Locale::resolveLineBreakStyle(const char* buf, size_t length) { in resolveLineBreakStyle() 255 EmojiStyle Locale::resolveEmojiStyle(const char* buf, size_t length) { in resolveEmojiStyle() 277 EmojiStyle Locale::scriptToEmojiStyle(uint32_t script) { in scriptToEmojiStyle() 288 uint8_t Locale::scriptToSubScriptBits(uint32_t script) { in scriptToSubScriptBits() 329 std::string Locale::getString() const { in getString() 408 Locale Locale::getPartialLocale(SubtagBits bits) const { in getPartialLocale() 409 Locale subLocale; in getPartialLocale() 431 bool Locale::isEqualScript(const Locale& other) const { in isEqualScript() [all …]
|
/frameworks/base/core/tests/coretests/src/android/content/res/ |
D | ConfigurationTest.java | 40 import java.util.Locale; 81 final Locale arabic = new Locale.Builder().setLocale(new Locale("ar", "AE")).build(); in testReadWriteProto() 82 final Locale urdu = new Locale.Builder().setLocale(new Locale("ur", "IN")).build(); in testReadWriteProto() 83 final Locale urduExtension = new Locale.Builder().setLocale(new Locale("ur", "IN")) in testReadWriteProto()
|
/frameworks/base/core/java/com/android/internal/inputmethod/ |
D | SubtypeLocaleUtils.java | 22 import java.util.Locale; 47 public static Locale constructLocaleFromString(String localeStr) { in constructLocaleFromString() 64 return new Locale(localeParams[0]); in constructLocaleFromString() 66 return new Locale(localeParams[0], localeParams[1]); in constructLocaleFromString() 68 return new Locale(localeParams[0], localeParams[1], localeParams[2]); in constructLocaleFromString()
|
/frameworks/base/services/robotests/backup/src/com/android/server/backup/encryption/chunking/ |
D | SingleStreamDiffScriptWriterTest.java | 35 import java.util.Locale; 43 private static final Locale HINDI = new Locale("hi", "IN"); 45 private Locale mDefaultLocale; 51 mDefaultLocale = Locale.getDefault(); in setUp() 59 Locale.setDefault(mDefaultLocale); in tearDown() 102 Locale.setDefault(HINDI); in writeChunk_formatsByteIndexesUsingArabicNumbers()
|
/frameworks/base/core/java/android/view/textclassifier/ |
D | ModelFileManager.java | 34 import java.util.Locale; 80 final List<Locale.LanguageRange> languageRangeList = Locale.LanguageRange.parse(languages); in findBestModelFile() 162 final List<Locale> supportedLocales = new ArrayList<>(); in createModelFile() 164 supportedLocales.add(Locale.forLanguageTag(langTag)); in createModelFile() 204 private final List<Locale> mSupportedLocales; 208 public ModelFile(File file, int version, List<Locale> supportedLocales, in ModelFile() 234 public boolean isAnyLanguageSupported(List<Locale.LanguageRange> languageRanges) { in isAnyLanguageSupported() 236 return mLanguageIndependent || Locale.lookup(languageRanges, mSupportedLocales) != null; in isAnyLanguageSupported() 240 public List<Locale> getSupportedLocales() { in getSupportedLocales() 294 for (Locale locale : mSupportedLocales) { in toString() [all …]
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
D | MccTableTest.java | 31 import java.util.Locale; 88 assertEquals(Locale.forLanguageTag("en-CA"), in testLocale() 90 assertEquals(Locale.forLanguageTag("en-GB"), in testLocale() 92 assertEquals(Locale.forLanguageTag("en-US"), in testLocale() 94 assertEquals(Locale.forLanguageTag("zh-HK"), in testLocale() 96 assertEquals(Locale.forLanguageTag("en-HK"), in testLocale() 98 assertEquals(Locale.forLanguageTag("zh-TW"), in testLocale()
|