Home
last modified time | relevance | path

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

12345678910>>...18

/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.java33 import java.util.Locale;
40 private final Locale[] mList;
47 private static final Locale[] sEmptyList = new Locale[0];
56 public Locale get(int index) { in get()
87 public int indexOf(Locale locale) { in indexOf()
102 final Locale[] otherList = ((LocaleList) other).mList; in equals()
162 public LocaleList(@NonNull Locale... list) { in LocaleList()
167 final ArrayList<Locale> localeList = new ArrayList<>(); in LocaleList()
168 final HashSet<Locale> seenLocales = new HashSet<Locale>(); in LocaleList()
171 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 …]
DDateFormatTest.java40 import java.util.Locale;
68 assertFalse(DateFormat.is24HourLocale(Locale.US)); in testIs24HourLocale()
69 assertTrue(DateFormat.is24HourLocale(Locale.GERMANY)); in testIs24HourLocale()
74 DateFormatSymbols dfs = DateFormat.getIcuDateFormatSymbols(Locale.US); in testgetIcuDateFormatSymbols()
85 Locale lv = new Locale("lv"); in testGetDateFormatOrder()
92 Locale fa = new Locale("fa"); in testGetDateFormatOrder()
101 Locale enUS = Locale.US; in testGetDateFormatOrder()
108 Locale enGB = Locale.UK; in testGetDateFormatOrder()
144 private static String best(Locale l, String skeleton) { in best()
151 assertIllegalArgumentException(Locale.US, "jmma"); in testGetBestDateTimePattern_disableDuplicateField()
[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/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/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
83Locale locale = (java.util.Locale) in.readSerializable(java.util.Locale.class.getClassLoader(), ja… in ServiceInfo()
92 locales = new ArrayList<Locale>(localesCount); in ServiceInfo()
94Locale l = (java.util.Locale) in.readSerializable(java.util.Locale.class.getClassLoader(), java.ut… 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/java/com/android/internal/app/
DLocaleHelper.java29 import java.util.Locale;
43 public static String toSentenceCase(String str, Locale locale) { in toSentenceCase()
60 public static String normalizeForSearch(String str, Locale locale) { in normalizeForSearch()
70 private static boolean shouldUseDialectName(Locale locale) { in shouldUseDialectName()
86 public static String getDisplayName(Locale locale, Locale displayLocale, boolean sentenceCase) { in getDisplayName()
101 public static String getDisplayName(Locale locale, boolean sentenceCase) { in getDisplayName()
102 return getDisplayName(locale, Locale.getDefault(), sentenceCase); in getDisplayName()
113 public static String getDisplayCountry(Locale locale, Locale displayLocale) { in getDisplayCountry()
132 public static String getDisplayCountry(Locale locale) { in getDisplayCountry()
146 LocaleList locales, Locale displayLocale, @IntRange(from=1) int maxLocales) { in getDisplayLocaleList()
[all …]
DAppLocaleStore.java30 import java.util.Locale;
40 HashSet<Locale> appSupportedLocales = new HashSet<>(); in getAppSupportedLocales()
41 HashSet<Locale> assetLocale = getAssetLocales(context, packageName); in getAppSupportedLocales()
87 private static HashSet<Locale> getAssetLocales(Context context, String packageName) { in getAssetLocales()
88 HashSet<Locale> result = new HashSet<>(); in getAssetLocales()
100 result.add(Locale.forLanguageTag(language)); in getAssetLocales()
109 private static HashSet<Locale> filterNotMatchingLocale( in filterNotMatchingLocale()
110 HashSet<Locale> appSupportedLocales, HashSet<Locale> assetLocale) { in filterNotMatchingLocale()
116 private static boolean matchLanguageInSet(Locale locale, HashSet<Locale> localesSet) { in matchLanguageInSet()
120 for (Locale l: localesSet) { in matchLanguageInSet()
[all …]
DLocaleStore.java33 import java.util.Locale;
50 private final Locale mLocale;
51 private final Locale mParent;
64 private LocaleInfo(Locale locale) { in LocaleInfo()
75 this(Locale.forLanguageTag(localeId)); in LocaleInfo()
78 private static Locale getParent(Locale locale) { in getParent()
82 return new Locale.Builder() in getParent()
85 .setExtension(Locale.UNICODE_LOCALE_EXTENSION, "") in getParent()
95 public Locale getLocale() { in getLocale()
100 public Locale getParent() { in getParent()
[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/tools/xmlpersistence/src/main/kotlin/
DStringCaseExtensions.kt17 import java.util.Locale
30 toCamelHumps().joinToString("") { it.toLowerCase(Locale.ROOT).capitalize(Locale.ROOT) } in toCamelHumps()
32 fun String.toLowerCamelCase(): String = toUpperCamelCase().decapitalize(Locale.ROOT) in toLowerCamelCase()
35 toCamelHumps().joinToString("-") { it.toUpperCase(Locale.ROOT) } in toLowerCamelCase()
38 toCamelHumps().joinToString("-") { it.toLowerCase(Locale.ROOT) } in toLowerKebabCase()
41 toCamelHumps().joinToString("_") { it.toUpperCase(Locale.ROOT) } in toUpperSnakeCase()
44 toCamelHumps().joinToString("_") { it.toLowerCase(Locale.ROOT) } in toLowerSnakeCase()
/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/core/tests/overlaytests/device/src/com/android/overlaytest/
DOverlayBaseTest.java51 import java.util.Locale;
89 private void setLocale(Locale locale) { in setLocale()
406 setLocale(new Locale("sv", "SE")); in testMatrix100000()
413 setLocale(new Locale("sv", "SE")); in testMatrix100001()
420 setLocale(new Locale("sv", "SE")); in testMatrix100010()
427 setLocale(new Locale("sv", "SE")); in testMatrix100011()
434 setLocale(new Locale("sv", "SE")); in testMatrix100100()
441 setLocale(new Locale("sv", "SE")); in testMatrix100101()
448 setLocale(new Locale("sv", "SE")); in testMatrix100110()
455 setLocale(new Locale("sv", "SE")); in testMatrix100111()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/hdmi/
DHdmiControlServiceStaticTest.java28 import java.util.Locale;
40 assertThat(HdmiControlService.localeToMenuLanguage(Locale.ENGLISH)).isEqualTo("eng"); in localToMenuLanguage_english()
45 assertThat(HdmiControlService.localeToMenuLanguage(Locale.GERMAN)).isEqualTo("ger"); in localToMenuLanguage_german()
50 assertThat(HdmiControlService.localeToMenuLanguage(Locale.TAIWAN)).isEqualTo("chi"); in localToMenuLanguage_taiwan()
55 assertThat(HdmiControlService.localeToMenuLanguage(new Locale("zh", "MO"))).isEqualTo( in localToMenuLanguage_macau()
61 assertThat(HdmiControlService.localeToMenuLanguage(new Locale("zh", "HK"))).isEqualTo( in localToMenuLanguage_hongkong()
67 assertThat(HdmiControlService.localeToMenuLanguage(Locale.CHINESE)).isEqualTo("zho"); in localToMenuLanguage_chinese()
/frameworks/base/telephony/java/com/android/internal/telephony/gsm/
DSmsCbHeader.java27 import java.util.Locale;
44 Locale.GERMAN.getLanguage(), // German
45 Locale.ENGLISH.getLanguage(), // English
46 Locale.ITALIAN.getLanguage(), // Italian
47 Locale.FRENCH.getLanguage(), // French
48 new Locale("es").getLanguage(), // Spanish
49 new Locale("nl").getLanguage(), // Dutch
50 new Locale("sv").getLanguage(), // Swedish
51 new Locale("da").getLanguage(), // Danish
52 new Locale("pt").getLanguage(), // Portuguese
[all …]
/frameworks/minikin/libs/minikin/
DLocale.h70 struct Locale { struct
79 Locale() in Locale() function
88 Locale(const StringPiece& buf);
91 explicit Locale(uint64_t identifier) in Locale() argument
99 bool operator==(const Locale& other) const {
105 bool operator!=(const Locale other) const { return !(*this == other); }
121 bool isEqualScript(const Locale& other) const; argument
150 Locale getPartialLocale(SubtagBits bits) const; argument
203 explicit LocaleList(std::vector<Locale>&& locales); argument
212 const Locale& operator[](size_t n) const { return mLocales[n]; }
[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()

12345678910>>...18