/cts/tests/tests/os/src/android/os/cts/ |
D | LocaleListTest.java | 26 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/content/src/android/content/res/cts/ |
D | ConfigurationTest.java | 26 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/ |
D | SuggestionSpanTest.java | 44 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/speech/src/android/speech/tts/cts/ |
D | StubTextToSpeechService.java | 29 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/location/src/android/location/cts/ |
D | AddressTest.java | 19 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 …]
|
D | GeocoderTest.java | 27 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/ |
D | ServiceInfoTest.java | 28 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/ |
D | AudioPresentationTest.java | 28 import java.util.Locale; 39 final Map<Locale, CharSequence> LABELS = generateLabels(); in testGetters() 40 final Locale LOCALE = Locale.US; in testGetters() 67 final Map<Locale, CharSequence> LABELS = generateLabels(); in testEqualsAndHashCode() 68 final Locale LOCALE = Locale.US; in testEqualsAndHashCode() 69 final Locale LOCALE_3 = Locale.FRENCH; in testEqualsAndHashCode() 185 private static Map<Locale, CharSequence> generateLabels() { in generateLabels() 186 Map<Locale, CharSequence> result = new HashMap<Locale, CharSequence>(); in generateLabels() 187 result.put(Locale.US, Locale.US.getDisplayLanguage()); in generateLabels() 188 result.put(Locale.FRENCH, Locale.FRENCH.getDisplayLanguage()); in generateLabels() [all …]
|
/cts/tests/tests/text/src/android/text/format/cts/ |
D | DateFormatTest.java | 55 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 …]
|
D | DateUtilsTest.java | 40 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 …]
|
D | LocaleUtils.java | 21 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/text/src/android/text/method/cts/ |
D | DateKeyListenerTest.java | 37 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 …]
|
D | TimeKeyListenerTest.java | 38 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 …]
|
D | DateTimeKeyListenerTest.java | 38 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 …]
|
D | DigitsKeyListenerTest.java | 42 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/telephony/current/EmbmsMiddlewareTestApp/src/android/telephony/cts/embmstestapp/ |
D | CtsStreamingService.java | 44 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);
|
D | CtsDownloadService.java | 56 import java.util.Locale; 121 Map<Locale, String> localeDict = new HashMap<Locale, String>() {{ 122 put(Locale.US, "Entertainment Source 1"); 123 put(Locale.CANADA, "Entertainment Source 1, eh?"); 125 List<Locale> locales = new ArrayList<Locale>() {{ 126 add(Locale.CANADA); 127 add(Locale.US);
|
/cts/tests/tests/provider/src/android/provider/cts/ |
D | UserDictionary_WordsTest.java | 27 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/ |
D | AutoTextTest.java | 38 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()
|
D | InputFilter_AllCapsTest.java | 37 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()
|
D | MyanmarTest.java | 44 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() 190 final Locale fontLocale = localeList.get(index); in testIfZawgyiLocaleIsSupported_fontWithQaagShouldExists()
|
D | TextUtilsTest.java | 67 import java.util.Locale; 2262 TextUtils.getLayoutDirectionFromLocale(Locale.ENGLISH)); in testGetLayoutDirectionFromLocale() 2264 TextUtils.getLayoutDirectionFromLocale(Locale.CANADA)); in testGetLayoutDirectionFromLocale() 2266 TextUtils.getLayoutDirectionFromLocale(Locale.CANADA_FRENCH)); in testGetLayoutDirectionFromLocale() 2268 TextUtils.getLayoutDirectionFromLocale(Locale.FRANCE)); in testGetLayoutDirectionFromLocale() 2270 TextUtils.getLayoutDirectionFromLocale(Locale.FRENCH)); in testGetLayoutDirectionFromLocale() 2272 TextUtils.getLayoutDirectionFromLocale(Locale.GERMAN)); in testGetLayoutDirectionFromLocale() 2274 TextUtils.getLayoutDirectionFromLocale(Locale.GERMANY)); in testGetLayoutDirectionFromLocale() 2276 TextUtils.getLayoutDirectionFromLocale(Locale.ITALIAN)); in testGetLayoutDirectionFromLocale() 2278 TextUtils.getLayoutDirectionFromLocale(Locale.ITALY)); in testGetLayoutDirectionFromLocale() [all …]
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | TextViewPrecomputedTextTest.java | 41 import java.util.Locale; 93 paint.setTextLocale(Locale.US.equals(paint.getTextLocale()) ? Locale.JAPAN : Locale.US); in makeDifferentParams()
|
/cts/tests/core/runner-axt/src/com/android/cts/runner/ |
D | CtsTestRunListener.java | 45 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/ |
D | CtsTestRunListener.java | 45 import java.util.Locale; 202 private final Locale mDefaultLocale; 210 mDefaultLocale = Locale.getDefault(); in TestEnvironment() 235 Locale.setDefault(mDefaultLocale); in reset()
|