Home
last modified time | relevance | path

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

1234

/cts/tests/tests/os/src/android/os/cts/
DLocaleListTest.java26 import java.util.Locale;
38 ll = new LocaleList(new Locale[0]); in testEmptyLocaleList()
48 final LocaleList ll = new LocaleList(Locale.US); in testOneMemberLocaleList()
52 assertEquals(Locale.US, ll.get(0)); in testOneMemberLocaleList()
57 final Locale enPH = Locale.forLanguageTag("en-PH"); in testTwoMemberLocaleList()
58 final Locale[] la = {enPH, Locale.US}; in testTwoMemberLocaleList()
64 assertEquals(Locale.US, ll.get(1)); in testTwoMemberLocaleList()
70 LocaleList ll = new LocaleList((Locale) null); in testNullArgument()
76 LocaleList ll = new LocaleList((Locale[]) null); in testNullArgument()
84 final Locale[] la = {Locale.US, null}; in testNullArguments()
[all …]
/cts/tests/tests/speech/src/android/speech/tts/cts/
DStubTextToSpeechService.java29 import java.util.Locale;
45 private ArrayList<Locale> supportedLanguages = new ArrayList<Locale>();
46 private ArrayList<Locale> supportedCountries = new ArrayList<Locale>();
47 private ArrayList<Locale> GBFallbacks = new ArrayList<Locale>();
50 supportedLanguages.add(new Locale("eng")); in StubTextToSpeechService()
51 supportedCountries.add(new Locale("eng", "USA")); in StubTextToSpeechService()
52 supportedCountries.add(new Locale("eng", "GBR")); in StubTextToSpeechService()
53 GBFallbacks.add(new Locale("eng", "NZL")); in StubTextToSpeechService()
63 if (supportedCountries.contains(new Locale(lang, country))) { in onIsLanguageAvailable()
66 if (supportedLanguages.contains(new Locale(lang))) { in onIsLanguageAvailable()
[all …]
/cts/tests/tests/content/src/android/content/res/cts/
DConfigurationTest.java26 import java.util.Locale;
45 mConfig.setLocale(Locale.getDefault()); in makeConfiguration()
119 cfg1.locale = Locale.forLanguageTag("en"); in testCompareTo()
120 cfg2.locale = Locale.forLanguageTag("en-Shaw"); in testCompareTo()
122 cfg1.locale = Locale.forLanguageTag("en-Shaw"); in testCompareTo()
123 cfg2.locale = Locale.forLanguageTag("en"); in testCompareTo()
126 cfg1.locale = new Locale("", "", "2"); in testCompareTo()
127 cfg2.locale = new Locale("", "", "3"); in testCompareTo()
129 cfg1.locale = new Locale("", "", "3"); in testCompareTo()
130 cfg2.locale = new Locale("", "", "2"); in testCompareTo()
[all …]
/cts/tests/tests/text/src/android/text/style/cts/
DSuggestionSpanTest.java44 import java.util.Locale;
56 final Locale locale = Locale.forLanguageTag("az-Arab"); in testConstructorWithContext()
72 final SuggestionSpan span = new SuggestionSpan(Locale.forLanguageTag("en"), suggestions, in testGetSuggestionSpans()
85 final SuggestionSpan span = new SuggestionSpan(Locale.forLanguageTag("en"), suggestions, in testGetSuggestionSpans_emptySuggestions()
99 final SuggestionSpan span = new SuggestionSpan(Locale.forLanguageTag("en"), suggestions, in testGetSuggestionSpans_suggestionsWithNullValue()
113 SuggestionSpan span = new SuggestionSpan(Locale.forLanguageTag("en"), anySuggestions, flag); in testGetFlags()
124 final SuggestionSpan span1 = new SuggestionSpan(null, Locale.forLanguageTag("en"), in testEquals_returnsTrueForDeserializedInstances()
133 final SuggestionSpan span1 = new SuggestionSpan(null, Locale.forLanguageTag("en"), in testEquals_returnsTrueIfTheFlagsAreDifferent()
146 final Locale anyLocale = Locale.forLanguageTag("en"); in testEquals_returnsFalseIfCreationTimeIsNotSame()
170 private Locale toWellFormedLocale(@Nullable final Locale locale) { in toWellFormedLocale()
[all …]
/cts/tests/tests/location/src/android/location/cts/
DAddressTest.java19 import java.util.Locale;
32 new Address(Locale.ENGLISH); in testConstructor()
34 new Address(Locale.FRANCE); in testConstructor()
40 Address address = new Address(Locale.GERMAN); in testDescribeContents()
52 Address address = new Address(Locale.ITALY); in testAccessAdminArea()
63 Address address = new Address(Locale.JAPAN); in testAccessCountryCode()
74 Address address = new Address(Locale.KOREA); in testAccessCountryName()
85 Address address = new Address(Locale.TAIWAN); in testAccessExtras()
102 Address address = new Address(Locale.SIMPLIFIED_CHINESE); in testAccessFeatureName()
113 Address address = new Address(Locale.CHINA); in testAccessLatitude()
[all …]
DGeocoderTest.java27 import java.util.Locale;
37 new Geocoder(getContext(), Locale.ENGLISH); in testConstructor()
120 Geocoder geocoder = new Geocoder(getContext(), Locale.US); in testGetFromLocationName()
/cts/tests/tests/telephony/current/src/android/telephony/embms/cts/
DServiceInfoTest.java28 import java.util.Locale;
35 private static final Map<Locale, String> LOCALE_DICT = new HashMap<Locale, String>() {{
36 put(Locale.US, "Entertainment Source 1");
37 put(Locale.CANADA, "Entertainment Source 1, eh?");
39 private static final List<Locale> LOCALES = new ArrayList<Locale>() {{
40 add(Locale.CANADA);
41 add(Locale.US);
57 for (Locale l : STREAMING_SERVICE_INFO.getNamedContentLocales()) { in testDataAccess()
/cts/tests/tests/media/src/android/media/cts/
DAudioPresentationTest.java28 import java.util.Locale;
38 final Map<Locale, CharSequence> LABELS = generateLabels(); in testGetters()
39 final Locale LOCALE = Locale.US; in testGetters()
66 final Map<Locale, CharSequence> LABELS = generateLabels(); in testEqualsAndHashCode()
67 final Locale LOCALE = Locale.US; in testEqualsAndHashCode()
68 final Locale LOCALE_3 = Locale.FRENCH; in testEqualsAndHashCode()
184 private static Map<Locale, CharSequence> generateLabels() { in generateLabels()
185 Map<Locale, CharSequence> result = new HashMap<Locale, CharSequence>(); in generateLabels()
186 result.put(Locale.US, Locale.US.getDisplayLanguage()); in generateLabels()
187 result.put(Locale.FRENCH, Locale.FRENCH.getDisplayLanguage()); in generateLabels()
[all …]
/cts/tests/tests/text/src/android/text/method/cts/
DDateKeyListenerTest.java37 import java.util.Locale;
52 new DateKeyListener(Locale.US); in testConstructor()
53 new DateKeyListener(Locale.forLanguageTag("fa-IR")); in testConstructor()
68 final DateKeyListener usListener1 = DateKeyListener.getInstance(Locale.US); in testGetInstance()
69 final DateKeyListener usListener2 = DateKeyListener.getInstance(new Locale("en", "US")); in testGetInstance()
71 Locale.forLanguageTag("fa-IR")); in testGetInstance()
88 final MockDateKeyListener usMockDateKeyListener = new MockDateKeyListener(Locale.US); in testGetAcceptedChars()
92 Locale.forLanguageTag("fa-IR")); in testGetAcceptedChars()
126 dateKeyListener = new DateKeyListener(Locale.US); in testGetInputType()
128 dateKeyListener = new DateKeyListener(Locale.UK); in testGetInputType()
[all …]
DTimeKeyListenerTest.java38 import java.util.Locale;
50 new TimeKeyListener(Locale.US); in testConstructor()
51 new TimeKeyListener(Locale.forLanguageTag("fa-IR")); in testConstructor()
66 final TimeKeyListener usListener1 = TimeKeyListener.getInstance(Locale.US); in testGetInstance()
67 final TimeKeyListener usListener2 = TimeKeyListener.getInstance(new Locale("en", "US")); in testGetInstance()
69 Locale.forLanguageTag("fa-IR")); in testGetInstance()
86 final MockTimeKeyListener usMockTimeKeyListener = new MockTimeKeyListener(Locale.US); in testGetAcceptedChars()
90 Locale.forLanguageTag("fa-IR")); in testGetAcceptedChars()
125 listener = TimeKeyListener.getInstance(Locale.US); in testGetInputType()
127 listener = TimeKeyListener.getInstance(Locale.UK); in testGetInputType()
[all …]
DDateTimeKeyListenerTest.java38 import java.util.Locale;
53 new DateTimeKeyListener(Locale.US); in testConstructor()
54 new DateTimeKeyListener(Locale.forLanguageTag("fa-IR")); in testConstructor()
69 final DateTimeKeyListener usListener1 = DateTimeKeyListener.getInstance(Locale.US); in testGetInstance()
71 new Locale("en", "US")); in testGetInstance()
73 Locale.forLanguageTag("fa-IR")); in testGetInstance()
91 new MockDateTimeKeyListener(Locale.US); in testGetAcceptedChars()
95 Locale.forLanguageTag("fa-IR")); in testGetAcceptedChars()
129 listener = DateTimeKeyListener.getInstance(Locale.US); in testGetInputType()
131 listener = DateTimeKeyListener.getInstance(Locale.UK); in testGetInputType()
[all …]
DDigitsKeyListenerTest.java42 import java.util.Locale;
58 new DigitsKeyListener(Locale.US); in testConstructor()
59 new DigitsKeyListener(Locale.US, true, true); in testConstructor()
60 new DigitsKeyListener(Locale.US, true, false); in testConstructor()
61 new DigitsKeyListener(Locale.US, false, true); in testConstructor()
62 new DigitsKeyListener(Locale.US, false, false); in testConstructor()
64 final Locale ir = Locale.forLanguageTag("fa-IR"); in testConstructor()
434 DigitsKeyListener.getInstance(Locale.forLanguageTag("fa-IR"), true, true); in testFilter4_internationalized()
754 DigitsKeyListener listener3 = DigitsKeyListener.getInstance((Locale) null); in testGetInstance1()
793 DigitsKeyListener listener1 = DigitsKeyListener.getInstance(Locale.US); in testGetInstance4()
[all …]
/cts/tests/tests/text/src/android/text/format/cts/
DDateFormatTest.java55 import java.util.Locale;
76 private Locale mDefaultLocale;
82 mDefaultLocale = Locale.getDefault(); in setup()
92 if ((mDefaultLocale != null) && !Locale.getDefault().equals(mDefaultLocale)) { in teardown()
93 Locale.setDefault(mDefaultLocale); in teardown()
179 if (!mDefaultLocale.equals(Locale.US)) { in testFormatMethods()
180 Locale.setDefault(Locale.US); in testFormatMethods()
292 for (Locale locale : Locale.getAvailableLocales()) { in test_bug_82144()
293 Locale.setDefault(locale); in test_bug_82144()
321 final Locale oldLocale = Locale.getDefault(); in test_ContextLocaleIsUsed()
[all …]
DDateUtilsTest.java40 import java.util.Locale;
58 if (!LocaleUtils.isCurrentLocale(mContext, Locale.US)) { in testGetDayOfWeekString()
79 if (!LocaleUtils.isCurrentLocale(mContext, Locale.US)) { in testGetMonthString()
96 if (!LocaleUtils.isCurrentLocale(mContext, Locale.US)) { in testGetAMPMString()
108 if (!LocaleUtils.isCurrentLocale(mContext, Locale.US)) { in test_getRelativeTimeSpanString()
134 if (!LocaleUtils.isCurrentLocale(mContext, Locale.US)) { in test_getRelativeTimeSpanString_withContext()
172 if (!LocaleUtils.isCurrentLocale(mContext, Locale.US)) { in test_formatElapsedTime()
195 if (!LocaleUtils.isCurrentLocale(mContext, Locale.US)) { in testFormatDateRange()
208 if (!LocaleUtils.isCurrentLocale(mContext, Locale.US)) { in testFormatDateRange_withFormatter()
224 if (!LocaleUtils.isCurrentLocale(mContext, Locale.US)) { in testFormatDateRange_withFormatterAndTimezone()
[all …]
DLocaleUtils.java21 import java.util.Locale;
26 public static boolean isCurrentLocale(Context context, Locale locale) { in isCurrentLocale()
28 Locale currentLocale = context.getResources().getConfiguration().locale; in isCurrentLocale()
/cts/tests/tests/provider/src/android/provider/cts/
DUserDictionary_WordsTest.java27 import java.util.Locale;
81 assertWord("testWord1", 42, null, Locale.KOREA, 42); in testAddWord()
82 assertWord("testWord2", -3007, "tw2", Locale.JAPAN, 0); in testAddWord()
83 assertWord("testWord3", 1337, "tw3", Locale.US, 255); in testAddWord()
86 private void assertWord(String word, int frequency, String shortcut, Locale locale, in assertWord()
/cts/tests/tests/text/src/android/text/cts/
DAutoTextTest.java38 import java.util.Locale;
50 Locale.setDefault(Locale.ENGLISH); in setup()
52 if (!config.locale.equals(Locale.getDefault())) { in setup()
53 config.locale = Locale.getDefault(); in setup()
DMyanmarTest.java44 import java.util.Locale;
66 private static List<Locale> sZawgyiLocales = new ArrayList<>();
67 private static List<Locale> sMymrLocales = new ArrayList<>();
74 final Locale locale = Locale.forLanguageTag(localeName); in setupLocales()
157 final Locale fontLocale = localeList.get(index); in testIfZawgyiLocaleIsSupported_fontWithQaagShouldExists()
DInputFilter_AllCapsTest.java37 import java.util.Locale;
93 final AllCaps usAllCaps = new AllCaps(Locale.US); in testFilter_turkish()
94 final AllCaps turkishAllCaps = new AllCaps(new Locale("tr", "TR")); in testFilter_turkish()
113 final Locale greek = new Locale("el", "GR"); in testFilter_greekWithSpans()
/cts/tests/tests/telephony/current/EmbmsMiddlewareTestApp/src/android/telephony/cts/embmstestapp/
DCtsStreamingService.java44 import java.util.Locale;
72 Map<Locale, String> localeDict = new HashMap<Locale, String>() {{
73 put(Locale.US, "Entertainment Source 1");
74 put(Locale.CANADA, "Entertainment Source 1, eh?");
76 List<Locale> locales = new ArrayList<Locale>() {{
77 add(Locale.CANADA);
78 add(Locale.US);
DCtsDownloadService.java56 import java.util.Locale;
119 Map<Locale, String> localeDict = new HashMap<Locale, String>() {{
120 put(Locale.US, "Entertainment Source 1");
121 put(Locale.CANADA, "Entertainment Source 1, eh?");
123 List<Locale> locales = new ArrayList<Locale>() {{
124 add(Locale.CANADA);
125 add(Locale.US);
/cts/tests/tests/widget/src/android/widget/cts/
DTextViewPrecomputedTextTest.java41 import java.util.Locale;
93 paint.setTextLocale(Locale.US.equals(paint.getTextLocale()) ? Locale.JAPAN : Locale.US); in makeDifferentParams()
/cts/tests/autofillservice/src/android/autofillservice/cts/
DAttachedContextActivity.java25 import java.util.Locale;
53 configuration.setLocale(new Locale(language)); in applyLocale()
/cts/tests/core/runner-axt/src/com/android/cts/runner/
DCtsTestRunListener.java45 import java.util.Locale;
202 private final Locale mDefaultLocale;
210 mDefaultLocale = Locale.getDefault(); in TestEnvironment()
235 Locale.setDefault(mDefaultLocale); in reset()
/cts/tests/core/runner/src/com/android/cts/runner/
DCtsTestRunListener.java45 import java.util.Locale;
202 private final Locale mDefaultLocale;
210 mDefaultLocale = Locale.getDefault(); in TestEnvironment()
235 Locale.setDefault(mDefaultLocale); in reset()

1234