Home
last modified time | relevance | path

Searched refs:LocaleList (Results 1 – 25 of 66) sorted by relevance

123

/frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/
DSettingsHelperTest.java27 import android.os.LocaleList;
45 assertEquals(LocaleList.forLanguageTags("en-US"), in testResolveLocales()
47 LocaleList.forLanguageTags(""), // restore in testResolveLocales()
48 LocaleList.forLanguageTags("en-US"), // current in testResolveLocales()
52 assertEquals(LocaleList.forLanguageTags("en-US"), in testResolveLocales()
54 LocaleList.forLanguageTags("en-US"), // restore in testResolveLocales()
55 LocaleList.forLanguageTags("en-US"), // current in testResolveLocales()
58 assertEquals(LocaleList.forLanguageTags("en-US,ja-JP"), in testResolveLocales()
60 LocaleList.forLanguageTags("en-US,ja-JP"), // restore in testResolveLocales()
61 LocaleList.forLanguageTags("en-US,ja-JP"), // current in testResolveLocales()
[all …]
/frameworks/base/core/tests/coretests/src/android/os/
DLocaleListTest.java27 LocaleList ll; in testConstructor()
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()
56 final LocaleList ll = new LocaleList(null, LocaleList.getEmptyLocaleList()); in testConstructor_nullThrows()
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/inputmethod/
DLocaleUtilsTest.java21 import android.os.LocaleList;
46 final LocaleList preferredLocales = LocaleList.getEmptyLocaleList(); in testFilterByLanguageEmptyLanguageList()
62 final LocaleList preferredLocales = LocaleList.forLanguageTags("zh-Hans-TW"); in testFilterDoesNotMatchAnything()
73 final LocaleList preferredLocales = LocaleList.forLanguageTags("fr,en-US,ja-JP"); in testFilterByLanguageEmptySource()
83 final LocaleList preferredLocales = in testFilterByLanguageNullAvailableLocales()
84 LocaleList.forLanguageTags("en-AU,en-GB,en-US,en,en-IN"); in testFilterByLanguageNullAvailableLocales()
92 final LocaleList preferredLocales = in testFilterByLanguageNullAvailableLocales()
93 LocaleList.forLanguageTags("en-AU,en-GB,en-US,en,en-IN"); in testFilterByLanguageNullAvailableLocales()
103 final LocaleList preferredLocales = in testFilterByLanguageNullAvailableLocales()
104 LocaleList.forLanguageTags("en-AU,en-GB,en-US,en,en-IN"); in testFilterByLanguageNullAvailableLocales()
[all …]
/frameworks/base/core/java/android/os/
DLocaleList.java38 public final class LocaleList implements Parcelable { class
47 private static final LocaleList sEmptyLocaleList = new LocaleList();
99 if (!(other instanceof LocaleList)) in equals()
101 final Locale[] otherList = ((LocaleList) other).mList; in equals()
180 public LocaleList(@NonNull Locale... list) { in LocaleList() method in LocaleList
215 public LocaleList(@NonNull Locale topLocale, LocaleList otherLocales) { in LocaleList() method in LocaleList
258 public static final Parcelable.Creator<LocaleList> CREATOR
259 = new Parcelable.Creator<LocaleList>() {
261 public LocaleList createFromParcel(Parcel source) {
262 return LocaleList.forLanguageTags(source.readString());
[all …]
DLocaleList.aidl19 parcelable LocaleList;
/frameworks/base/core/java/android/text/style/
DLocaleSpan.java22 import android.os.LocaleList;
37 private final LocaleList mLocales;
53 mLocales = locale == null ? LocaleList.getEmptyLocaleList() : new LocaleList(locale); in LocaleSpan()
62 public LocaleSpan(@NonNull LocaleList locales) { in LocaleSpan()
68 mLocales = LocaleList.CREATOR.createFromParcel(source); in LocaleSpan()
112 public LocaleList getLocales() { in getLocales()
126 private static void apply(@NonNull Paint paint, @NonNull LocaleList locales) { in apply()
/frameworks/minikin/libs/minikin/
DLocale.h38 class LocaleList; variable
122 int calcScoreFor(const LocaleList& supported) const;
132 friend class LocaleList; // for LocaleList constructor
172 class LocaleList {
174 explicit LocaleList(std::vector<Locale>&& locales);
175 LocaleList() in LocaleList() function
179 LocaleList(LocaleList&&) = default;
206 LocaleList(const LocaleList&) = delete;
207 void operator=(const LocaleList&) = delete;
DLocaleListCache.h46 static inline const LocaleList& getById(uint32_t id) { in getById()
55 const LocaleList& getByIdInternal(uint32_t id);
63 std::vector<LocaleList> mLocaleLists GUARDED_BY(mMutex);
DLocaleListCache.cpp122 LocaleList fontLocales(parseLocaleList(locales)); in getIdInternal()
131 const LocaleList& LocaleListCache::getByIdInternal(uint32_t id) { in getByIdInternal()
/frameworks/support/compat/src/main/java/androidx/core/os/
DLocaleListCompat.java20 import android.os.LocaleList;
105 private LocaleList mLocaleList = new LocaleList();
109 mLocaleList = new LocaleList(list); in setLocaleList()
185 if (object instanceof LocaleList) { in wrap()
186 instance.setLocaleList((LocaleList) object); in wrap()
312 return LocaleListCompat.wrap(LocaleList.getAdjustedDefault()); in getAdjustedDefault()
332 return LocaleListCompat.wrap(LocaleList.getDefault()); in getDefault()
354 private void setLocaleList(LocaleList localeList) { in setLocaleList()
/frameworks/base/core/java/android/view/textclassifier/
DTextSelection.java23 import android.os.LocaleList;
180 @Nullable private final LocaleList mDefaultLocales;
187 LocaleList defaultLocales, in Request()
236 public LocaleList getDefaultLocales() { in getDefaultLocales()
249 @Nullable private LocaleList mDefaultLocales;
276 public Builder setDefaultLocales(@Nullable LocaleList defaultLocales) { in setDefaultLocales()
341 mDefaultLocales = in.readInt() == 0 ? null : LocaleList.CREATOR.createFromParcel(in); in Request()
389 @Nullable private LocaleList mDefaultLocales;
410 public Options setDefaultLocales(@Nullable LocaleList defaultLocales) { in setDefaultLocales()
416 public LocaleList getDefaultLocales() { in getDefaultLocales()
DTextLinks.java24 import android.os.LocaleList;
305 @Nullable private final LocaleList mDefaultLocales;
312 LocaleList defaultLocales, in Request()
336 public LocaleList getDefaultLocales() { in getDefaultLocales()
373 @Nullable private LocaleList mDefaultLocales;
389 public Builder setDefaultLocales(@Nullable LocaleList defaultLocales) { in setDefaultLocales()
491 mDefaultLocales = in.readInt() == 0 ? null : LocaleList.CREATOR.createFromParcel(in); in Request()
646 @Nullable private LocaleList mDefaultLocales;
695 public Options setDefaultLocales(@Nullable LocaleList defaultLocales) { in setDefaultLocales()
720 public LocaleList getDefaultLocales() { in getDefaultLocales()
DTextClassification.java36 import android.os.LocaleList;
491 @Nullable private final LocaleList mDefaultLocales;
498 LocaleList defaultLocales,
537 public LocaleList getDefaultLocales() {
559 @Nullable private LocaleList mDefaultLocales;
586 public Builder setDefaultLocales(@Nullable LocaleList defaultLocales) {
650 mDefaultLocales = in.readInt() == 0 ? null : LocaleList.CREATOR.createFromParcel(in);
730 @Nullable private LocaleList mDefaultLocales;
752 public Options setDefaultLocales(@Nullable LocaleList defaultLocales) {
764 public LocaleList getDefaultLocales() {
/frameworks/base/core/tests/coretests/src/android/content/res/
DResourcesLocaleTest.java19 import android.os.LocaleList;
69 final LocaleList preferredLocales = LocaleList.forLanguageTags("en-US,pl-PL"); in testEnglishIsAlwaysConsideredSupported()
86 final LocaleList preferredLocales = LocaleList.forLanguageTags("fr-FR,pl-PL"); in testSelectFirstSupportedLanguage()
DResourcesManagerTest.java21 import android.os.LocaleList;
151 expectedConfig.setLocales(LocaleList.getAdjustedDefault()); in testUpdateConfigurationUpdatesAllAssetManagers()
235 expectedConfig1.setLocales(LocaleList.getAdjustedDefault()); in testMultipleResourcesForOneActivityGetUpdatedWhenActivityBaseUpdates()
243 expectedConfig2.setLocales(LocaleList.getAdjustedDefault()); in testMultipleResourcesForOneActivityGetUpdatedWhenActivityBaseUpdates()
/frameworks/base/core/java/android/hardware/input/
DKeyboardLayout.java20 import android.os.LocaleList;
38 private final LocaleList mLocales;
53 LocaleList locales, int vid, int pid) { in KeyboardLayout()
68 mLocales = LocaleList.CREATOR.createFromParcel(source); in KeyboardLayout()
106 public LocaleList getLocales() { in getLocales()
/frameworks/base/core/tests/coretests/src/android/text/util/
DLinkifyTest.java25 import android.os.LocaleList;
59 private static final LocaleList LOCALE_LIST_US = new LocaleList(Locale.US);
60 private LocaleList mOriginalLocales;
66 mOriginalLocales = LocaleList.getDefault(); in setup()
67 LocaleList.setDefault(LOCALE_LIST_US); in setup()
72 LocaleList.setDefault(mOriginalLocales); in teardown()
/frameworks/minikin/tests/unittest/
DFontLanguageListCacheTest.cpp51 const LocaleList& defLangs = LocaleListCache::getById(0); in TEST()
54 const LocaleList& locales = LocaleListCache::getById(LocaleListCache::getId("en")); in TEST()
58 const LocaleList& locales2 = LocaleListCache::getById(LocaleListCache::getId("en,jp")); in TEST()
DFontFamilyTest.cpp30 static const LocaleList& createLocaleList(const std::string& input) { in createLocaleList()
257 LocaleList emptyLocales; in TEST()
261 const LocaleList& singletonLocales = createLocaleList("en"); in TEST()
266 const LocaleList& twoLocales = createLocaleList("en,fr"); in TEST()
273 const LocaleList& oneUnsupported = createLocaleList("abcd-example"); in TEST()
276 const LocaleList& twoUnsupporteds = createLocaleList("abcd-example,abcd-example"); in TEST()
280 const LocaleList& firstUnsupported = createLocaleList("abcd-example,en"); in TEST()
284 const LocaleList& lastUnsupported = createLocaleList("en,abcd-example"); in TEST()
296 const LocaleList& locales = createLocaleList("en,en-Latn"); in TEST()
300 const LocaleList& fr = createLocaleList("fr,fr-FR,fr-Latn-FR"); in TEST()
[all …]
/frameworks/base/core/java/android/view/inputmethod/
DEditorInfo.java21 import android.os.LocaleList;
460 public LocaleList hintLocales = null;
556 LocaleList.getEmptyLocaleList().writeToParcel(dest, flags); in writeToParcel()
582 LocaleList hintLocales = LocaleList.CREATOR.createFromParcel(source);
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/
DSettingsHelper.java40 import android.os.LocaleList;
343 public static LocaleList resolveLocales(LocaleList restore, LocaleList current, in resolveLocales()
369 return new LocaleList(filtered.toArray(new Locale[filtered.size()])); in resolveLocales()
385 final LocaleList localeList = LocaleList.forLanguageTags(localeCodes); in setLocaleData()
391 final LocaleList currentLocales = conf.getLocales(); in setLocaleData()
393 final LocaleList merged = resolveLocales(localeList, currentLocales, supportedLocales); in setLocaleData()
/frameworks/base/core/java/com/android/internal/app/
DLocalePicker.java29 import android.os.LocaleList;
115 if (!isInDeveloperMode && LocaleList.isPseudoLocale(l)) { in getAllAssetLocales()
255 updateLocales(new LocaleList(locale));
263 public static void updateLocales(LocaleList locales) {
284 public static LocaleList getLocales() {
290 return LocaleList.getDefault();
/frameworks/base/core/tests/coretests/src/android/text/format/
DDateUtilsTest.java23 import android.os.LocaleList;
44 private static final LocaleList LOCALE_LIST_US = new LocaleList(Locale.US);
45 private LocaleList mOriginalLocales;
154 private void setLocales(LocaleList locales) { in setLocales()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DConfigurationControllerImpl.java21 import android.os.LocaleList;
42 private LocaleList mLocaleList;
79 final LocaleList localeList = newConfig.getLocales(); in onConfigurationChanged()
/frameworks/base/core/tests/coretests/src/android/view/textclassifier/
DTextSelectionTest.java21 import android.os.LocaleList;
71 .setDefaultLocales(new LocaleList(Locale.US, Locale.GERMANY)) in testParcelRequest()

123