Home
last modified time | relevance | path

Searched refs:Locale (Results 1 – 25 of 407) sorted by relevance

12345678910>>...17

/frameworks/base/core/tests/coretests/src/com/android/internal/inputmethod/
DSubtypeLocaleUtilsTest.java27 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/services/tests/servicestests/src/com/android/server/inputmethod/
DLocaleUtilsTest.java30 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/tests/TtsTests/src/com/android/speech/tts/
DTtsEnginesTests.java6 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/
DLocaleUtilsTest.java29 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/
DLocaleUtils.java23 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/
DInputMethodSubtypePreferenceTest.java33 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/
DLocaleList.java31 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/
DTimeMigrationUtilsTest.java31 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 …]
/frameworks/base/core/tests/coretests/src/android/os/
DLocaleListTest.java23 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/opt/localepicker/tests/src/com/android/localepicker/
DLocaleHelperTest.java30 import java.util.Locale;
37 String sentenceCase = LocaleHelper.toSentenceCase("hello Google", Locale.US); in toSentenceCase_shouldUpperCaseFirstLetter()
43 String lowerCase = LocaleHelper.normalizeForSearch("english", Locale.US); in normalizeForSearch_sameStrings_shouldBeEqualAfterNormalized()
44 String upperCase = LocaleHelper.normalizeForSearch("ENGLISH", Locale.US); in normalizeForSearch_sameStrings_shouldBeEqualAfterNormalized()
51 LocaleHelper.getDisplayName(Locale.US, Locale.US, /* sentenceCase */ true); in getDisplayName_shouldReturnLocaleDisplayName()
59 Locale.CANADA_FRENCH, in getDisplayName_withDifferentLocale_shouldReturnLocalizedDisplayName()
60 Locale.US, in getDisplayName_withDifferentLocale_shouldReturnLocalizedDisplayName()
67 String displayCountry = LocaleHelper.getDisplayCountry(Locale.GERMANY, Locale.GERMANY); in getDisplayCountry_shouldReturnLocalizedCountryName()
73 LocaleInfo germany = LocaleStore.getLocaleInfo(Locale.GERMANY); in localeInfoComparator_shouldSortLocales()
74 LocaleInfo unitedStates = LocaleStore.getLocaleInfo(Locale.US); in localeInfoComparator_shouldSortLocales()
[all …]
DSuggestedLocaleAdapterTest.java31 import java.util.Locale;
44 mLocaleOptions.add(LocaleStore.getLocaleInfo(Locale.US)); in setUp()
45 mLocaleOptions.add(LocaleStore.getLocaleInfo(Locale.GERMANY)); in setUp()
46 mLocaleOptions.add(LocaleStore.getLocaleInfo(Locale.JAPAN)); in setUp()
47 LocaleInfo korea = LocaleStore.getLocaleInfo(Locale.KOREA); in setUp()
53 mEnglishCountryOptions.add(LocaleStore.getLocaleInfo(Locale.US)); in setUp()
54 mEnglishCountryOptions.add(LocaleStore.getLocaleInfo(Locale.UK)); in setUp()
55 mEnglishCountryOptions.add(LocaleStore.getLocaleInfo(Locale.CANADA)); in setUp()
56 mEnglishCountryOptions.add(LocaleStore.getLocaleInfo(Locale.forLanguageTag("en-IN"))); in setUp()
57 mEnglishCountryOptions.add(LocaleStore.getLocaleInfo(Locale.forLanguageTag("en-HK"))); in setUp()
[all …]
/frameworks/base/core/java/com/android/internal/app/
DLocaleHelper.java28 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 …]
DLocaleStore.java29 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/
DOsuProviderInfoTest.java33 import java.util.Locale;
99 Locale defaultLocale = Locale.getDefault(); in getFriendlyNameMatchingDefaultLocale()
100 Locale nonDefaultLocale = Locale.FRENCH; in getFriendlyNameMatchingDefaultLocale()
102 nonDefaultLocale = Locale.ENGLISH; in getFriendlyNameMatchingDefaultLocale()
123 Locale nonDefaultLocale = Locale.FRENCH; in getFriendlyNameNotMatchingDefaultLocale()
124 if (nonDefaultLocale.equals(Locale.getDefault())) { in getFriendlyNameNotMatchingDefaultLocale()
125 nonDefaultLocale = Locale.ENGLISH; in getFriendlyNameNotMatchingDefaultLocale()
159 Locale defaultLocale = Locale.getDefault(); in getServiceDescriptionMatchingDefaultLocale()
160 Locale nonDefaultLocale = Locale.FRENCH; in getServiceDescriptionMatchingDefaultLocale()
162 nonDefaultLocale = Locale.ENGLISH; in getServiceDescriptionMatchingDefaultLocale()
[all …]
/frameworks/opt/localepicker/src/com/android/localepicker/
DLocaleHelper.java28 import java.util.Locale;
68 static String toSentenceCase(String str, Locale locale) { in toSentenceCase()
88 static String normalizeForSearch(String str, Locale locale) { in normalizeForSearch()
98 private static boolean shouldUseDialectName(Locale locale) { in shouldUseDialectName()
113 public static String getDisplayName(Locale locale, Locale displayLocale, boolean sentenceCase) { in getDisplayName()
128 public static String getDisplayName(Locale locale, boolean sentenceCase) { in getDisplayName()
129 return getDisplayName(locale, Locale.getDefault(), sentenceCase); in getDisplayName()
139 public static String getDisplayCountry(Locale locale, Locale displayLocale) { in getDisplayCountry()
158 public static String getDisplayCountry(Locale locale) { in getDisplayCountry()
168 public static Locale addLikelySubtags(Locale locale) { in addLikelySubtags()
[all …]
DLocaleStore.java33 import java.util.Locale;
45 private final Locale mLocale;
46 private final Locale mParent;
59 private LocaleInfo(Locale locale) { in LocaleInfo()
70 this(Locale.forLanguageTag(localeId)); in LocaleInfo()
73 private static Locale getParent(Locale locale) { in getParent()
77 return new Locale.Builder() in getParent()
80 .setExtension(Locale.UNICODE_LOCALE_EXTENSION, "") in getParent()
89 public Locale getLocale() { in getLocale()
93 public Locale getParent() { in getParent()
[all …]
/frameworks/base/telephony/java/android/telephony/mbms/
DServiceInfo.java30 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/base/core/tests/overlaytests/device/src/com/android/overlaytest/
DOverlayBaseTest.java50 import java.util.Locale;
85 private void setLocale(Locale locale) { in setLocale()
402 setLocale(new Locale("sv", "SE")); in testMatrix100000()
409 setLocale(new Locale("sv", "SE")); in testMatrix100001()
416 setLocale(new Locale("sv", "SE")); in testMatrix100010()
423 setLocale(new Locale("sv", "SE")); in testMatrix100011()
430 setLocale(new Locale("sv", "SE")); in testMatrix100100()
437 setLocale(new Locale("sv", "SE")); in testMatrix100101()
444 setLocale(new Locale("sv", "SE")); in testMatrix100110()
451 setLocale(new Locale("sv", "SE")); in testMatrix100111()
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/util/
DLocaleUtils.java29 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/
DSmsCbHeader.java26 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/services/tests/servicestests/src/com/android/server/hdmi/
DHdmiControlServiceStaticTest.java26 import java.util.Locale;
37 assertThat(HdmiControlService.localeToMenuLanguage(Locale.ENGLISH)).isEqualTo("eng"); in localToMenuLanguage_english()
42 assertThat(HdmiControlService.localeToMenuLanguage(Locale.GERMAN)).isEqualTo("ger"); in localToMenuLanguage_german()
47 assertThat(HdmiControlService.localeToMenuLanguage(Locale.TAIWAN)).isEqualTo("chi"); in localToMenuLanguage_taiwan()
52 assertThat(HdmiControlService.localeToMenuLanguage(new Locale("zh", "MO"))).isEqualTo( in localToMenuLanguage_macau()
58 assertThat(HdmiControlService.localeToMenuLanguage(new Locale("zh", "HK"))).isEqualTo( in localToMenuLanguage_hongkong()
64 assertThat(HdmiControlService.localeToMenuLanguage(Locale.CHINESE)).isEqualTo("zho"); in localToMenuLanguage_chinese()
/frameworks/minikin/libs/minikin/
DLocale.h77 struct Locale { struct
86 Locale() in Locale() argument
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 …]
DLocale.cpp158 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/java/com/android/internal/inputmethod/
DSubtypeLocaleUtils.java22 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/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/chunking/
DSingleStreamDiffScriptWriterTest.java35 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()

12345678910>>...17