Home
last modified time | relevance | path

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

12345678910>>...12

/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/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/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/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 …]
DLocalePicker.java43 import java.util.Locale;
53 public void onLocaleSelected(Locale locale); in onLocaleSelected()
62 final Locale locale;
64 public LocaleInfo(String label, Locale locale) { in LocaleInfo()
73 public Locale getLocale() { in getLocale()
120 final Locale l = Locale.forLanguageTag(locale.replace('_', '-')); in getAllAssetLocales()
212 Locale l, String[] specialLocaleCodes, String[] specialLocaleNames) {
250 final Locale locale = ((LocaleInfo)getListAdapter().getItem(position)).locale;
261 public static void updateLocale(Locale locale) {
/frameworks/base/core/java/android/text/
DHyphenator.java31 import java.util.Locale;
48 final static HashMap<Locale, Hyphenator> sMap = new HashMap<Locale, Hyphenator>();
68 public static Hyphenator get(@Nullable Locale locale) { in get()
78 final Locale languageAndVariantOnlyLocale = in get()
79 new Locale(locale.getLanguage(), "", variant); in get()
88 final Locale languageOnlyLocale = new Locale(locale.getLanguage()); in get()
98 final Locale scriptOnlyLocale = new Locale.Builder() in get()
115 String patternFilename = "hyph-" + languageTag.toLowerCase(Locale.US) + ".hyb"; in loadHyphenator()
226 sMap.put(Locale.forLanguageTag(languageTag), h); in init()
233 sMap.put(Locale.forLanguageTag(language), sMap.get(Locale.forLanguageTag(fallback))); in init()
/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/support/v4/java/android/support/v4/text/
DICUCompat.java21 import java.util.Locale;
26 public String maximizeAndGetScript(Locale locale); in maximizeAndGetScript()
31 public String maximizeAndGetScript(Locale locale) { in maximizeAndGetScript()
38 public String maximizeAndGetScript(Locale locale) { in maximizeAndGetScript()
45 public String maximizeAndGetScript(Locale locale) { in maximizeAndGetScript()
86 public static String maximizeAndGetScript(Locale locale) { in maximizeAndGetScript()
DTextUtilsCompat.java24 import java.util.Locale;
62 public int getLayoutDirectionFromLocale(@Nullable Locale locale) { in getLayoutDirectionFromLocale()
87 private static int getLayoutDirectionFromFirstChar(@NonNull Locale locale) { in getLayoutDirectionFromFirstChar()
107 public int getLayoutDirectionFromLocale(@Nullable Locale locale) { in getLayoutDirectionFromLocale()
142 public static int getLayoutDirectionFromLocale(@Nullable Locale locale) { in getLayoutDirectionFromLocale()
146 public static final Locale ROOT = new Locale("", "");
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DMccTable.java36 import java.util.Locale;
94 Locale locale = new Locale("", entry.mIso); in defaultTimeZoneForMcc()
128 Locale likelyLocale = ICU.addLikelySubtags(new Locale("und", entry.mIso)); in defaultLanguageForMcc()
226 private static final Map<Locale, Locale> FALLBACKS = new HashMap<Locale, Locale>();
229 FALLBACKS.put(Locale.CANADA, Locale.US); in FALLBACKS.put()
239 private static Locale chooseBestFallback(Locale target, List<Locale> candidates) { in chooseBestFallback()
244 Locale fallback = target; in chooseBestFallback()
267 private static Locale getLocaleForLanguageCountry(Context context, String language, in getLocaleForLanguageCountry()
277 final Locale target = new Locale(language, country); in getLocaleForLanguageCountry()
286 List<Locale> languageMatches = new ArrayList<>(); in getLocaleForLanguageCountry()
[all …]
/frameworks/base/core/tests/coretests/src/android/text/format/
DFormatterTest.java25 import java.util.Locale;
29 private Locale mOriginalLocale;
46 private void setLocale(Locale locale) { in setLocale()
52 Locale.setDefault(locale); in setLocale()
57 setLocale(Locale.ENGLISH); in testFormatBytes()
95 setLocale(new Locale("es", "ES")); in testFormatBytes()
/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/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/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/core/java/com/android/internal/inputmethod/
DInputMethodUtils.java52 import java.util.Locale;
65 private static final Locale ENGLISH_LOCALE = new Locale("en");
81 private static final Locale[] SEARCH_ORDER_OF_FALLBACK_LOCALES = {
82 Locale.ENGLISH, // "en"
83 Locale.US, // "en_US"
84 Locale.UK, // "en_GB"
134 @Nullable final Locale requiredLocale, final boolean checkCountry, in isSystemImeThatHasSubtypeOf()
149 public static Locale getFallbackLocaleForDefaultIme(final ArrayList<InputMethodInfo> imis, in getFallbackLocaleForDefaultIme()
154 for (final Locale fallbackLocale : SEARCH_ORDER_OF_FALLBACK_LOCALES) { in getFallbackLocaleForDefaultIme()
165 for (final Locale fallbackLocale : SEARCH_ORDER_OF_FALLBACK_LOCALES) { in getFallbackLocaleForDefaultIme()
[all …]
/frameworks/base/core/tests/coretests/src/android/text/
DTextUtilsTest.java32 import java.util.Locale;
529 TextUtils.getLayoutDirectionFromLocale(Locale.ROOT)); in testGetLayoutDirectionFromLocale()
531 TextUtils.getLayoutDirectionFromLocale(Locale.forLanguageTag("en"))); in testGetLayoutDirectionFromLocale()
533 TextUtils.getLayoutDirectionFromLocale(Locale.forLanguageTag("en-US"))); in testGetLayoutDirectionFromLocale()
535 TextUtils.getLayoutDirectionFromLocale(Locale.forLanguageTag("az"))); in testGetLayoutDirectionFromLocale()
537 TextUtils.getLayoutDirectionFromLocale(Locale.forLanguageTag("az-AZ"))); in testGetLayoutDirectionFromLocale()
539 TextUtils.getLayoutDirectionFromLocale(Locale.forLanguageTag("az-Latn"))); in testGetLayoutDirectionFromLocale()
541 TextUtils.getLayoutDirectionFromLocale(Locale.forLanguageTag("en-EG"))); in testGetLayoutDirectionFromLocale()
543 TextUtils.getLayoutDirectionFromLocale(Locale.forLanguageTag("ar-Latn"))); in testGetLayoutDirectionFromLocale()
546 TextUtils.getLayoutDirectionFromLocale(Locale.forLanguageTag("ar"))); in testGetLayoutDirectionFromLocale()
[all …]
/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()
/frameworks/base/wifi/java/android/net/wifi/p2p/nsd/
DWifiP2pDnsSdServiceInfo.java25 import java.util.Locale;
130 sb.append(String.format(Locale.US, "%02x", data.length)); in createPtrServiceQuery()
187 dnsName = dnsName.toLowerCase(Locale.ROOT); // TODO: is this right? in createRequest()
190 sb.append(String.format(Locale.US, "%04x", dnsType)); in createRequest()
191 sb.append(String.format(Locale.US, "%02x", version)); in createRequest()
218 sb.append(String.format(Locale.US, "%02x", dnsName.length())); in compressDnsName()
228 sb.append(String.format(Locale.US, "%02x", name.length())); in compressDnsName()
/frameworks/base/core/java/android/view/
DAccessibilityIterators.java23 import java.util.Locale;
71 private Locale mLocale;
75 public static CharacterTextSegmentIterator getInstance(Locale locale) { in getInstance()
82 private CharacterTextSegmentIterator(Locale locale) { in CharacterTextSegmentIterator()
148 Locale locale = newConfig.locale; in onConfigurationChanged()
160 protected void onLocaleChanged(Locale locale) { in onLocaleChanged()
168 public static WordTextSegmentIterator getInstance(Locale locale) { in getInstance()
175 private WordTextSegmentIterator(Locale locale) { in WordTextSegmentIterator()
180 protected void onLocaleChanged(Locale locale) { in onLocaleChanged()
/frameworks/support/v4/api23/android/support/v4/text/
DICUCompatApi23.java23 import java.util.Locale;
36 new Class[]{ Locale.class });
43 public static String maximizeAndGetScript(Locale locale) { in maximizeAndGetScript()
46 return ((Locale) sAddLikelySubtagsMethod.invoke(null, args)).getScript(); in maximizeAndGetScript()
/frameworks/base/packages/Osu/src/com/android/anqp/
DI18Name.java7 import java.util.Locale;
17 private final Locale mLocale;
30 mLocale = Locale.forLanguageTag(mLanguage); in I18Name()
41 mLocale = Locale.forLanguageTag(mLanguage); in I18Name()
48 public Locale getLocale() { in getLocale()

12345678910>>...12