Home
last modified time | relevance | path

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

12345678910>>...13

/frameworks/base/core/tests/coretests/src/com/android/internal/inputmethod/
DLocaleUtilsTest.java24 import java.util.Locale;
28 private static final LocaleUtils.LocaleExtractor<Locale> sIdentityMapper =
29 new LocaleUtils.LocaleExtractor<Locale>() {
31 public Locale get(Locale source) {
38 final ArrayList<Locale> availableLocales = new ArrayList<>(); in testFilterByLanguageEmptyLanguageList()
39 availableLocales.add(Locale.forLanguageTag("en-US")); in testFilterByLanguageEmptyLanguageList()
40 availableLocales.add(Locale.forLanguageTag("fr-CA")); in testFilterByLanguageEmptyLanguageList()
41 availableLocales.add(Locale.forLanguageTag("in")); in testFilterByLanguageEmptyLanguageList()
42 availableLocales.add(Locale.forLanguageTag("ja")); in testFilterByLanguageEmptyLanguageList()
43 availableLocales.add(Locale.forLanguageTag("fil")); in testFilterByLanguageEmptyLanguageList()
[all …]
DInputMethodUtilsTest.java37 import java.util.Locale;
51 private static final Locale LOCALE_EN = new Locale("en");
52 private static final Locale LOCALE_EN_US = new Locale("en", "US");
53 private static final Locale LOCALE_EN_GB = new Locale("en", "GB");
54 private static final Locale LOCALE_EN_IN = new Locale("en", "IN");
55 private static final Locale LOCALE_FI = new Locale("fi");
56 private static final Locale LOCALE_FI_FI = new Locale("fi", "FI");
57 private static final Locale LOCALE_FIL = new Locale("fil");
58 private static final Locale LOCALE_FIL_PH = new Locale("fil", "PH");
59 private static final Locale LOCALE_FR = new Locale("fr");
[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/core/java/android/os/
DLocaleList.java30 import java.util.Locale;
37 private final Locale[] mList;
44 private static final Locale[] sEmptyList = new Locale[0];
53 public Locale get(int index) { in get()
84 public int indexOf(Locale locale) { in indexOf()
99 final Locale[] otherList = ((LocaleList) other).mList; in equals()
159 public LocaleList(@NonNull Locale... list) { in LocaleList()
164 final Locale[] localeList = new Locale[list.length]; in LocaleList()
165 final HashSet<Locale> seenLocales = new HashSet<Locale>(); in LocaleList()
168 final Locale l = list[i]; in LocaleList()
[all …]
/frameworks/support/compat/java/android/support/v4/os/
DLocaleListHelper.java33 import java.util.Locale;
44 private final Locale[] mList;
51 private static final Locale[] sEmptyList = new Locale[0];
62 Locale get(int index) { in get()
99 int indexOf(Locale locale) { in indexOf()
116 final Locale[] otherList = ((LocaleListHelper) other).mList; in equals()
173 LocaleListHelper(@NonNull Locale... list) { in LocaleListHelper()
178 final Locale[] localeList = new Locale[list.length]; in LocaleListHelper()
179 final HashSet<Locale> seenLocales = new HashSet<Locale>(); in LocaleListHelper()
182 final Locale l = list[i]; in LocaleListHelper()
[all …]
DLocaleListCompat.java27 import java.util.Locale;
41 public void setLocaleList(@NonNull Locale... list) { in setLocaleList()
51 public Locale get(int index) { in get()
68 public int indexOf(Locale locale) { in indexOf()
94 public Locale getFirstMatch(String[] supportedLocales) { in getFirstMatch()
107 public void setLocaleList(@NonNull Locale... list) { in setLocaleList()
117 public Locale get(int index) { in get()
134 public int indexOf(Locale locale) { in indexOf()
160 public Locale getFirstMatch(String[] supportedLocales) { in getFirstMatch()
204 public static LocaleListCompat create(@NonNull Locale... localeList) { in create()
[all …]
DLocaleHelper.java23 import java.util.Locale;
34 static Locale forLanguageTag(String str) { in forLanguageTag()
38 return new Locale(args[0], args[1], args[2]); in forLanguageTag()
40 return new Locale(args[0], args[1]); in forLanguageTag()
42 return new Locale(args[0]); in forLanguageTag()
47 return new Locale(args[0], args[1], args[2]); in forLanguageTag()
49 return new Locale(args[0], args[1]); in forLanguageTag()
51 return new Locale(args[0]); in forLanguageTag()
54 return new Locale(str); in forLanguageTag()
61 static String toLanguageTag(Locale locale) { in toLanguageTag()
DLocaleListInterface.java26 import java.util.Locale;
35 void setLocaleList(@NonNull Locale... list); in setLocaleList()
39 Locale get(int index); in get()
47 int indexOf(Locale locale); in indexOf()
61 Locale getFirstMatch(String[] supportedLocales); in getFirstMatch()
/frameworks/support/compat/tests/java/android/support/v4/os/
DLocaleListCompatTest.java38 import java.util.Locale;
57 ll = LocaleListCompat.create(new Locale[0]); in testEmptyLocaleList()
68 final LocaleListCompat ll = LocaleListCompat.create(Locale.US); in testOneMemberLocaleList()
72 assertEquals(Locale.US, ll.get(0)); in testOneMemberLocaleList()
78 final Locale enPH = forLanguageTag("en-PH"); in testTwoMemberLocaleList()
79 final Locale[] la = {enPH, Locale.US}; in testTwoMemberLocaleList()
85 assertEquals(Locale.US, ll.get(1)); in testTwoMemberLocaleList()
92 LocaleListCompat.create((Locale) null); in testNullArgument()
98 LocaleListCompat.create((Locale[]) null); in testNullArgument()
107 final Locale[] la = {Locale.US, null}; in testNullArguments()
[all …]
/frameworks/base/core/tests/coretests/src/android/os/
DLocaleListTest.java20 import java.util.Locale;
28 ll = new LocaleList(Locale.forLanguageTag("fr"), null); in testConstructor()
31 ll = new LocaleList(Locale.forLanguageTag("fr"), LocaleList.getEmptyLocaleList()); in testConstructor()
34 ll = new LocaleList(Locale.forLanguageTag("fr"), LocaleList.forLanguageTags("fr")); in testConstructor()
37 ll = new LocaleList(Locale.forLanguageTag("fr"), LocaleList.forLanguageTags("de")); in testConstructor()
40 ll = new LocaleList(Locale.forLanguageTag("fr"), LocaleList.forLanguageTags("de,ja")); in testConstructor()
43 ll = new LocaleList(Locale.forLanguageTag("fr"), LocaleList.forLanguageTags("de,fr,ja")); in testConstructor()
46 ll = new LocaleList(Locale.forLanguageTag("fr"), LocaleList.forLanguageTags("de,fr")); in testConstructor()
49 ll = new LocaleList(Locale.forLanguageTag("fr"), LocaleList.forLanguageTags("fr,de")); in testConstructor()
65 final Locale originalLocale = Locale.getDefault(); in testGetDefault_localeSetDefaultCalledButNoChangeNecessary()
[all …]
/frameworks/base/core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/
DOverlayBaseTest.java12 import java.util.Locale;
39 private void setLocale(Locale locale) { in setLocale()
40 Locale.setDefault(locale); in setLocale()
274 setLocale(new Locale("sv", "SE")); in testMatrix100000()
280 setLocale(new Locale("sv", "SE")); in testMatrix100001()
286 setLocale(new Locale("sv", "SE")); in testMatrix100010()
292 setLocale(new Locale("sv", "SE")); in testMatrix100011()
298 setLocale(new Locale("sv", "SE")); in testMatrix100100()
304 setLocale(new Locale("sv", "SE")); in testMatrix100101()
310 setLocale(new Locale("sv", "SE")); in testMatrix100110()
[all …]
/frameworks/base/core/java/com/android/internal/app/
DLocaleHelper.java27 import java.util.Locale;
67 public static String toSentenceCase(String str, Locale locale) { in toSentenceCase()
87 public static String normalizeForSearch(String str, Locale locale) { in normalizeForSearch()
97 private static boolean shouldUseDialectName(Locale locale) { in shouldUseDialectName()
112 public static String getDisplayName(Locale locale, Locale displayLocale, boolean sentenceCase) { in getDisplayName()
127 public static String getDisplayName(Locale locale, boolean sentenceCase) { in getDisplayName()
128 return getDisplayName(locale, Locale.getDefault(), sentenceCase); in getDisplayName()
138 public static String getDisplayCountry(Locale locale, Locale displayLocale) { in getDisplayCountry()
148 public static String getDisplayCountry(Locale locale) { in getDisplayCountry()
162 LocaleList locales, Locale displayLocale, @IntRange(from=1) int maxLocales) { in getDisplayLocaleList()
[all …]
DLocaleStore.java26 import java.util.Locale;
38 private final Locale mLocale;
39 private final Locale mParent;
52 private LocaleInfo(Locale locale) { in LocaleInfo()
63 this(Locale.forLanguageTag(localeId)); in LocaleInfo()
66 private static Locale getParent(Locale locale) { in getParent()
70 return new Locale.Builder() in getParent()
80 public Locale getLocale() { in getLocale()
84 public Locale getParent() { in getParent()
146 Locale parentWithScript = getParent(LocaleHelper.addLikelySubtags(mLocale)); in getLangScriptKey()
[all …]
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/
DAndroidLocale.java23 import java.util.Locale;
35 public static String toLanguageTag(Locale locale) { in toLanguageTag()
40 String adjusted = languageCode.toLowerCase(Locale.US); in adjustLanguageCode()
54 public static Locale forLanguageTag(String tag) { in forLanguageTag()
58 public static String getScript(Locale locale) { in getScript()
62 public static Locale getDefault() { in getDefault()
65 Locale locale = context.getConfiguration().locale; in getDefault()
70 return Locale.getDefault(); in getDefault()
/frameworks/base/core/java/android/text/
DHyphenator.java31 import java.util.Locale;
53 final static HashMap<Locale, Hyphenator> sMap = new HashMap<Locale, Hyphenator>();
79 public static Hyphenator get(@Nullable Locale locale) { in get()
89 final Locale languageAndVariantOnlyLocale = in get()
90 new Locale(locale.getLanguage(), "", variant); in get()
99 final Locale languageOnlyLocale = new Locale(locale.getLanguage()); in get()
109 final Locale scriptOnlyLocale = new Locale.Builder() in get()
136 String patternFilename = "hyph-" + data.mLanguageTag.toLowerCase(Locale.US) + ".hyb"; in loadHyphenator()
259 sMap.put(Locale.forLanguageTag(data.mLanguageTag), h); in init()
266 sMap.put(Locale.forLanguageTag(language), sMap.get(Locale.forLanguageTag(fallback))); in init()
/frameworks/base/core/java/android/view/textclassifier/
DTextLanguage.java27 import java.util.Locale;
37 @NonNull private final EntityConfidence<Locale> mLanguageConfidence;
38 @NonNull private final List<Locale> mLanguages;
41 int startIndex, int endIndex, @NonNull EntityConfidence<Locale> languageConfidence) { in TextLanguage()
79 public Locale getLanguage(int index) { in getLanguage()
89 public float getConfidenceScore(@Nullable Locale language) { in getConfidenceScore()
106 @NonNull private final EntityConfidence<Locale> mLanguageConfidence =
128 @NonNull Locale locale, @FloatRange(from = 0.0, to = 1.0) float confidenceScore) { in setLanguage()
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/picker/
DPickerUtility.java24 import java.util.Locale;
33 public final Locale locale;
38 private DateConstant(Locale locale, Resources resources) { in DateConstant()
50 public final Locale locale;
57 private TimeConstant(Locale locale, Resources resources) { in TimeConstant()
68 public static DateConstant getDateConstantInstance(Locale locale, Resources resources) { in getDateConstantInstance()
72 public static TimeConstant getTimeConstantInstance(Locale locale, Resources resources) { in getTimeConstantInstance()
89 public static Calendar getCalendarForLocale(Calendar oldCalendar, Locale locale) { in getCalendarForLocale()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DMccTableTest.java22 import java.util.Locale;
75 assertEquals(Locale.forLanguageTag("en-CA"), in testLocale()
77 assertEquals(Locale.forLanguageTag("en-GB"), in testLocale()
79 assertEquals(Locale.forLanguageTag("en-US"), in testLocale()
81 assertEquals(Locale.forLanguageTag("zh-HK"), in testLocale()
83 assertEquals(Locale.forLanguageTag("en-HK"), in testLocale()
85 assertEquals(Locale.forLanguageTag("zh-TW"), in testLocale()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/anqp/
DI18Name.java28 import java.util.Locale;
47 private final Locale mLocale;
51 public I18Name(String language, Locale locale, String text) { in I18Name()
77 Locale locale = Locale.forLanguageTag(language); in parse()
89 public Locale getLocale() { in getLocale()
/frameworks/base/location/java/android/location/
DGeocoderParams.java23 import java.util.Locale;
36 private Locale mLocale;
48 public GeocoderParams(Context context, Locale locale) { in GeocoderParams()
56 public Locale getLocale() { in getLocale()
74 gp.mLocale = new Locale(language, country, variant);
/frameworks/base/packages/StatementService/src/com/android/statementservice/retriever/
DAssetJsonWriter.java24 import java.util.Locale;
56 mWriter.name(key.toLowerCase(Locale.US)); in writeFieldLower()
57 mWriter.value(value.toLowerCase(Locale.US)); in writeFieldLower()
77 mWriter.name(key.toLowerCase(Locale.US)); in writeArrayUpper()
80 mWriter.value(value.toUpperCase(Locale.US)); in writeArrayUpper()
/frameworks/base/core/tests/coretests/src/android/text/format/
DFormatterTest.java29 import java.util.Locale;
38 private Locale mOriginalLocale;
57 setLocale(Locale.ENGLISH); in testFormatBytes()
98 setLocale(new Locale("es", "ES")); in testFormatBytes()
110 private void setLocale(Locale locale) { in setLocale()
116 Locale.setDefault(locale); in setLocale()
/frameworks/base/core/java/android/speech/tts/
DTtsEngines.java47 import java.util.Locale;
84 for (String language : Locale.getISOLanguages()) {
86 normalizeLanguage.put(new Locale(language).getISO3Language(), language); in normalizeLanguage.put()
94 for (String country : Locale.getISOCountries()) {
96 normalizeCountry.put(new Locale("", country).getISO3Country(), country); in normalizeCountry.put() argument
330 public Locale getLocalePrefForEngine(String engineName) { in getLocalePrefForEngine()
337 public Locale getLocalePrefForEngine(String engineName, String prefValue) { in getLocalePrefForEngine()
344 return Locale.getDefault(); in getLocalePrefForEngine()
347 Locale result = parseLocaleString(localeString); in getLocalePrefForEngine()
350 result = Locale.US; in getLocalePrefForEngine()
[all …]
/frameworks/base/packages/Osu/src/com/android/anqp/
DI18Name.java9 import java.util.Locale;
19 private final Locale mLocale;
32 mLocale = Locale.forLanguageTag(mLanguage); in I18Name()
43 mLocale = Locale.forLanguageTag(mLanguage); in I18Name()
50 public Locale getLocale() { in getLocale()
86 mLocale = Locale.forLanguageTag(mLanguage); in I18Name()
/frameworks/base/core/java/android/hardware/soundtrigger/
DKeyphraseMetadata.java21 import java.util.Locale;
31 public final ArraySet<Locale> supportedLocales;
34 public KeyphraseMetadata(int id, String keyphrase, ArraySet<Locale> supportedLocales, in KeyphraseMetadata()
58 public boolean supportsLocale(Locale locale) { in supportsLocale()

12345678910>>...13