Home
last modified time | relevance | path

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

1234

/frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/
DSettingsHelperTest.java32 import android.os.LocaleList;
97 assertEquals(LocaleList.forLanguageTags("en-US"), in testResolveLocales()
99 LocaleList.forLanguageTags(""), // restore in testResolveLocales()
100 LocaleList.forLanguageTags("en-US"), // current in testResolveLocales()
104 assertEquals(LocaleList.forLanguageTags("en-US"), in testResolveLocales()
106 LocaleList.forLanguageTags("en-US"), // restore in testResolveLocales()
107 LocaleList.forLanguageTags("en-US"), // current in testResolveLocales()
110 assertEquals(LocaleList.forLanguageTags("en-US,ja-JP"), in testResolveLocales()
112 LocaleList.forLanguageTags("en-US,ja-JP"), // restore in testResolveLocales()
113 LocaleList.forLanguageTags("en-US,ja-JP"), // current in testResolveLocales()
[all …]
/frameworks/base/core/tests/coretests/src/android/os/
DLocaleListTest.java28 LocaleList ll; in testConstructor()
29 ll = new LocaleList(Locale.forLanguageTag("fr"), null); in testConstructor()
32 ll = new LocaleList(Locale.forLanguageTag("fr"), LocaleList.getEmptyLocaleList()); in testConstructor()
35 ll = new LocaleList(Locale.forLanguageTag("fr"), LocaleList.forLanguageTags("fr")); in testConstructor()
38 ll = new LocaleList(Locale.forLanguageTag("fr"), LocaleList.forLanguageTags("de")); in testConstructor()
41 ll = new LocaleList(Locale.forLanguageTag("fr"), LocaleList.forLanguageTags("de,ja")); in testConstructor()
44 ll = new LocaleList(Locale.forLanguageTag("fr"), LocaleList.forLanguageTags("de,fr,ja")); in testConstructor()
47 ll = new LocaleList(Locale.forLanguageTag("fr"), LocaleList.forLanguageTags("de,fr")); in testConstructor()
50 ll = new LocaleList(Locale.forLanguageTag("fr"), LocaleList.forLanguageTags("fr,de")); in testConstructor()
57 final LocaleList ll = new LocaleList(null, LocaleList.getEmptyLocaleList()); in testConstructor_nullThrows()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/inputmethod/
DLocaleUtilsTest.java21 import android.os.LocaleList;
47 final LocaleList preferredLocales = LocaleList.getEmptyLocaleList(); in testFilterByLanguageEmptyLanguageList()
63 final LocaleList preferredLocales = LocaleList.forLanguageTags("zh-Hans-TW"); in testFilterDoesNotMatchAnything()
74 final LocaleList preferredLocales = LocaleList.forLanguageTags("fr,en-US,ja-JP"); in testFilterByLanguageEmptySource()
84 final LocaleList preferredLocales = in testFilterByLanguageNullAvailableLocales()
85 LocaleList.forLanguageTags("en-AU,en-GB,en-US,en,en-IN"); in testFilterByLanguageNullAvailableLocales()
93 final LocaleList preferredLocales = in testFilterByLanguageNullAvailableLocales()
94 LocaleList.forLanguageTags("en-AU,en-GB,en-US,en,en-IN"); in testFilterByLanguageNullAvailableLocales()
104 final LocaleList preferredLocales = in testFilterByLanguageNullAvailableLocales()
105 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()
161 public LocaleList(@NonNull Locale... list) { in LocaleList() method in LocaleList
196 public LocaleList(@NonNull Locale topLocale, LocaleList otherLocales) { in LocaleList() method in LocaleList
239 public static final @android.annotation.NonNull Parcelable.Creator<LocaleList> CREATOR
240 = new Parcelable.Creator<LocaleList>() {
242 public LocaleList createFromParcel(Parcel source) {
243 return LocaleList.forLanguageTags(source.readString8());
[all …]
/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()
DTextAppearanceSpan.java26 import android.os.LocaleList;
70 private final LocaleList mTextLocales;
157 LocaleList localeList = LocaleList.forLanguageTags(localeString); in TextAppearanceSpan()
252 mTextLocales = src.readParcelable(LocaleList.class.getClassLoader()); in TextAppearanceSpan()
374 public LocaleList getTextLocales() { in getTextLocales()
/frameworks/minikin/libs/minikin/
DLocale.h38 class LocaleList; variable
143 int calcScoreFor(const LocaleList& supported) const;
162 friend class LocaleList; // for LocaleList constructor
210 class LocaleList {
212 explicit LocaleList(std::vector<Locale>&& locales);
213 LocaleList() in LocaleList() function
217 LocaleList(LocaleList&&) = default;
244 LocaleList(const LocaleList&) = delete;
245 void operator=(const LocaleList&) = delete;
DLocaleListCache.h49 static inline const LocaleList& getById(uint32_t id) { in getById()
65 const LocaleList& getByIdInternal(uint32_t id);
73 std::vector<LocaleList> mLocaleLists GUARDED_BY(mMutex);
DLocaleListCache.cpp151 LocaleList fontLocales(std::move(locales)); in getIdInternal()
168 const LocaleList& localeList = getByIdInternal(id); in writeToInternal()
175 const LocaleList& LocaleListCache::getByIdInternal(uint32_t id) { in getByIdInternal()
/frameworks/base/core/tests/coretests/src/android/text/util/
DLinkifyTest.java25 import android.os.LocaleList;
51 private static final LocaleList LOCALE_LIST_US = new LocaleList(Locale.US);
52 private LocaleList mOriginalLocales;
58 mOriginalLocales = LocaleList.getDefault(); in setup()
59 LocaleList.setDefault(LOCALE_LIST_US); in setup()
64 LocaleList.setDefault(mOriginalLocales); in teardown()
/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/content/res/
DResourcesLocaleTest.java20 import android.os.LocaleList;
70 final LocaleList preferredLocales = LocaleList.forLanguageTags("en-US,pl-PL"); in testEnglishIsAlwaysConsideredSupported()
87 final LocaleList preferredLocales = LocaleList.forLanguageTags("fr-FR,pl-PL"); in testSelectFirstSupportedLanguage()
/frameworks/base/core/tests/coretests/src/android/graphics/
DFontListParserTest.java31 import android.os.LocaleList;
65 "sans-serif", LocaleList.getEmptyLocaleList(), VARIANT_DEFAULT); in named()
86 null, LocaleList.forLanguageTags("en"), VARIANT_DEFAULT); in fallback()
103 null, LocaleList.forLanguageTags("en"), VARIANT_COMPACT); in compact()
120 null, LocaleList.forLanguageTags("en"), VARIANT_ELEGANT); in elegant()
145 "sans-serif", LocaleList.getEmptyLocaleList(), VARIANT_DEFAULT); in styles()
171 "sans-serif", LocaleList.getEmptyLocaleList(), VARIANT_DEFAULT); in variable()
191 "sans-serif", LocaleList.getEmptyLocaleList(), VARIANT_DEFAULT); in ttc()
211 "sans-serif", LocaleList.getEmptyLocaleList(), VARIANT_DEFAULT); in psName()
/frameworks/base/core/java/android/view/inputmethod/
DInlineSuggestionsRequest.java28 import android.os.LocaleList;
82 private @NonNull LocaleList mSupportedLocales;
185 private static LocaleList defaultSupportedLocales() { in defaultSupportedLocales()
187 return LocaleList.getEmptyLocaleList(); in defaultSupportedLocales()
189 return LocaleList.getDefault(); in defaultSupportedLocales()
239 @NonNull LocaleList supportedLocales, in InlineSuggestionsRequest()
305 public @NonNull LocaleList getSupportedLocales() { in getSupportedLocales()
445 LocaleList supportedLocales = (LocaleList) in.readTypedObject(LocaleList.CREATOR); in InlineSuggestionsRequest()
495 private @NonNull LocaleList mSupportedLocales;
580 public @NonNull Builder setSupportedLocales(@NonNull LocaleList value) { in setSupportedLocales()
/frameworks/base/core/java/com/android/internal/app/
DLocalePicker.java32 import android.os.LocaleList;
156 if (!isInDeveloperMode && LocaleList.isPseudoLocale(l)) { in getAllAssetLocales()
297 updateLocales(new LocaleList(locale));
306 public static void updateLocales(LocaleList locales) {
329 private static LocaleList removeExcludedLocales(@NonNull LocaleList locales) {
345 : new LocaleList(filteredLocales.toArray(new Locale[0]));
354 public static LocaleList getLocales() {
360 return LocaleList.getDefault();
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/
DSettingsHelper.java33 import android.os.LocaleList;
397 public static LocaleList resolveLocales(LocaleList restore, LocaleList current, in resolveLocales()
423 return new LocaleList(filtered.toArray(new Locale[filtered.size()])); in resolveLocales()
439 final LocaleList localeList = LocaleList.forLanguageTags(localeCodes); in setLocaleData()
445 final LocaleList currentLocales = conf.getLocales(); in setLocaleData()
447 final LocaleList merged = resolveLocales(localeList, currentLocales, supportedLocales); in setLocaleData()
/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.cpp31 static const LocaleList& createLocaleList(const std::string& input) { in createLocaleList()
304 LocaleList emptyLocales; in TEST()
308 const LocaleList& singletonLocales = createLocaleList("en"); in TEST()
313 const LocaleList& twoLocales = createLocaleList("en,fr"); in TEST()
320 const LocaleList& oneUnsupported = createLocaleList("abcd-example"); in TEST()
323 const LocaleList& twoUnsupporteds = createLocaleList("abcd-example,abcd-example"); in TEST()
327 const LocaleList& firstUnsupported = createLocaleList("abcd-example,en"); in TEST()
331 const LocaleList& lastUnsupported = createLocaleList("en,abcd-example"); in TEST()
343 const LocaleList& locales = createLocaleList("en,en-Latn"); in TEST()
347 const LocaleList& fr = createLocaleList("fr,fr-FR,fr-Latn-FR"); in TEST()
[all …]
/frameworks/base/core/java/android/view/textclassifier/
DTextSelection.java24 import android.os.LocaleList;
260 @Nullable private final LocaleList mDefaultLocales;
270 LocaleList defaultLocales, in Request()
323 public LocaleList getDefaultLocales() { in getDefaultLocales()
383 @Nullable private LocaleList mDefaultLocales;
412 public Builder setDefaultLocales(@Nullable LocaleList defaultLocales) { in setDefaultLocales()
492 final LocaleList defaultLocales = in.readParcelable(null); in readFromParcel()
DTextLinks.java25 import android.os.LocaleList;
338 @Nullable private final LocaleList mDefaultLocales;
347 LocaleList defaultLocales, in Request()
373 public LocaleList getDefaultLocales() { in getDefaultLocales()
453 @Nullable private LocaleList mDefaultLocales;
473 public Builder setDefaultLocales(@Nullable LocaleList defaultLocales) { in setDefaultLocales()
561 final LocaleList defaultLocales = in.readParcelable(null); in readFromParcel()
DTextClassification.java35 import android.os.LocaleList;
516 @Nullable private final LocaleList mDefaultLocales;
525 LocaleList defaultLocales,
566 public LocaleList getDefaultLocales() {
629 @Nullable private LocaleList mDefaultLocales;
656 public Builder setDefaultLocales(@Nullable LocaleList defaultLocales) {
716 final LocaleList defaultLocales = in.readParcelable(null);
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/android/
DAndroidLocale.java21 import android.os.LocaleList;
53 LocaleList localeList = context.getConfiguration().getLocales(); in getDefault()
/frameworks/base/core/tests/coretests/src/android/text/format/
DDateUtilsTest.java23 import android.os.LocaleList;
45 private static final LocaleList LOCALE_LIST_US = new LocaleList(Locale.US);
46 private LocaleList mOriginalLocales;
155 private void setLocales(LocaleList locales) { in setLocales()
/frameworks/libs/systemui/iconloaderlib/src/com/android/launcher3/icons/cache/
DCachingLogic.java21 import android.os.LocaleList;
48 default String getKeywords(T object, LocaleList localeList) { in getKeywords()
/frameworks/base/core/java/android/app/
DConfigurationController.java34 import android.os.LocaleList;
298 final LocaleList newLocaleList = mResourcesManager.getConfiguration().getLocales(); in updateLocaleListFromAppContext()
302 LocaleList.setDefault(newLocaleList, i); in updateLocaleListFromAppContext()
310 LocaleList.setDefault(new LocaleList(bestLocale, newLocaleList)); in updateLocaleListFromAppContext()

1234