/external/libtextclassifier/java/tests/instrumentation/src/com/android/textclassifier/ |
D | ModelFileManagerImplTest.java | 24 import android.os.LocaleList; 96 setDefaultLocalesRule.set(new LocaleList(DEFAULT_LOCALE)); in setup() 152 MODEL_TYPE, new LocaleList(DEFAULT_LOCALE), /*detectedLocales=*/ null); in findBestModel_languageDependentModelIsPreferred() 165 MODEL_TYPE, new LocaleList(DEFAULT_LOCALE), /*detectedLocales=*/ null); in findBestModel_noMatchedLanguageModel() 178 MODEL_TYPE, new LocaleList(DEFAULT_LOCALE), /*detectedLocales=*/ null); in findBestModel_languageIsMoreImportantThanVersion() 184 setDefaultLocalesRule.set(LocaleList.forLanguageTags("zh")); in findBestModel_filterOutLocalePreferenceNotInDefaultLocaleList_onlyCheckLanguage() 192 MODEL_TYPE, LocaleList.forLanguageTags("zh-hk"), /*detectedLocales=*/ null); in findBestModel_filterOutLocalePreferenceNotInDefaultLocaleList_onlyCheckLanguage() 198 setDefaultLocalesRule.set(LocaleList.forLanguageTags("zh-hk")); in findBestModel_filterOutLocalePreferenceNotInDefaultLocaleList_match() 206 MODEL_TYPE, LocaleList.forLanguageTags("zh"), /*detectedLocales=*/ null); in findBestModel_filterOutLocalePreferenceNotInDefaultLocaleList_match() 212 setDefaultLocalesRule.set(LocaleList.forLanguageTags("en")); in findBestModel_filterOutLocalePreferenceNotInDefaultLocaleList_doNotMatch() [all …]
|
/external/robolectric/robolectric/src/test/java/org/robolectric/shadows/ |
D | ShadowLocaleListTest.java | 6 import android.os.LocaleList; 21 assertThat(LocaleList.getDefault().size()).isEqualTo(1); in setUp() 26 assertThat(LocaleList.getDefault().toLanguageTags()).doesNotContain("IN"); in testResetter() 29 LocaleList.setDefault(new LocaleList(locale)); in testResetter() 30 assertThat(LocaleList.getDefault().toLanguageTags()).contains("IN"); in testResetter() 35 assertThat(LocaleList.getDefault().toLanguageTags()).doesNotContain("IN"); in testResetter()
|
D | ShadowLocaleManagerTest.java | 9 import android.os.LocaleList; 22 private static final LocaleList DEFAULT_LOCALES = LocaleList.forLanguageTags("en-XC,ar-XB"); 39 .isEqualTo(LocaleList.getEmptyLocaleList()); in setApplicationLocales_updatesMap() 70 LocaleList localeList = localeManager.getSystemLocales(); in getSystemLocales_en() 78 LocaleList localeList = localeManager.getSystemLocales(); in getSystemLocales_zh()
|
/external/libtextclassifier/java/tests/instrumentation/src/com/android/textclassifier/testing/ |
D | SetDefaultLocalesRule.java | 19 import android.os.LocaleList; 24 private LocaleList originalValue; 29 originalValue = LocaleList.getDefault(); in before() 32 public void set(LocaleList newValue) { in set() 33 LocaleList.setDefault(newValue); in set() 39 LocaleList.setDefault(originalValue); in after()
|
/external/libtextclassifier/native/utils/i18n/ |
D | locale-list_test.cc | 28 LocaleList locale_list = LocaleList::ParseFrom("en-US,zh-CN,ar,en"); in TEST() 35 LocaleList locale_list = LocaleList::ParseFrom(""); in TEST() 42 LocaleList locale_list = LocaleList::ParseFrom("en,invalid"); in TEST()
|
D | locale-list.cc | 23 LocaleList LocaleList::ParseFrom(const std::string& locale_tags) { in ParseFrom() 41 return LocaleList(locales, split_locales, reference_locale); in ParseFrom()
|
D | locale-list.h | 28 class LocaleList { 35 static LocaleList ParseFrom(const std::string& locale_tags); 42 LocaleList(const std::vector<Locale>& locales, in LocaleList() function
|
/external/robolectric/shadows/framework/src/main/java/org/robolectric/shadows/ |
D | ShadowLocaleManager.java | 7 import android.os.LocaleList; 20 private final Map<String, LocaleList> appLocales = new HashMap<>(); 38 protected LocaleList getApplicationLocales(String packageName) { in getApplicationLocales() 45 return appLocales.getOrDefault(packageName, LocaleList.getEmptyLocaleList()); in getApplicationLocales() 54 protected void setApplicationLocales(String packageName, LocaleList locales) { in setApplicationLocales() 60 protected LocaleList getSystemLocales() { in getSystemLocales() 65 return LocaleList.getEmptyLocaleList(); in getSystemLocales()
|
D | ShadowLocaleList.java | 6 import android.os.LocaleList; 15 @Implements(value = LocaleList.class, minSdk = VERSION_CODES.N) 29 @ForType(LocaleList.class) 41 void setDefaultLocaleList(LocaleList localeList); in setDefaultLocaleList() 45 void setDefaultAdjustedLocaleList(LocaleList localeList); in setDefaultAdjustedLocaleList() 49 void setLastExplicitlySetLocaleList(LocaleList localeList); in setLastExplicitlySetLocaleList()
|
/external/cronet/base/android/javatests/src/org/chromium/base/ |
D | LocaleUtilsTest.java | 10 import android.os.LocaleList; 163 LocaleList localeList = new LocaleList(locale1, locale2); in testToLanguageTags() 169 localeList = new LocaleList(locale1, locale2); in testToLanguageTags() 175 localeList = new LocaleList(locale1, locale2); in testToLanguageTags() 181 localeList = new LocaleList(locale1, locale2); in testToLanguageTags() 186 localeList = new LocaleList(locale1); in testToLanguageTags() 316 LocaleList localeList = new LocaleList(locale1, locale2); in testGetConfigurationN() 322 localeList = new LocaleList(locale1, locale2); in testGetConfigurationN() 348 config.setLocales(LocaleList.forLanguageTags(tags)); in testSetDefaultLocalesFromConfigurationN() 351 Assert.assertEquals(tags, LocaleList.getDefault().toLanguageTags()); in testSetDefaultLocalesFromConfigurationN() [all …]
|
/external/libtextclassifier/java/tests/instrumentation/src/com/android/textclassifier/downloader/ |
D | ModelDownloadManagerTest.java | 23 import android.os.LocaleList; 57 private static final LocaleList DEFAULT_LOCALE_LIST = new LocaleList(new Locale(LOCALE_TAG)); 143 assertThat(LocaleList.getDefault()).isEqualTo(LocaleList.forLanguageTags("zh,fr")); in onTextClassifierServiceCreated_localeListOverridden() 144 assertThat(LocaleList.getAdjustedDefault()).isEqualTo(LocaleList.forLanguageTags("zh,fr")); in onTextClassifierServiceCreated_localeListOverridden() 226 assertThat(LocaleList.getDefault()).isEqualTo(LocaleList.forLanguageTags("zh,fr")); in onTextClassifierDeviceConfigChanged_localeListOverridden() 227 assertThat(LocaleList.getAdjustedDefault()).isEqualTo(LocaleList.forLanguageTags("zh,fr")); in onTextClassifierDeviceConfigChanged_localeListOverridden()
|
/external/cronet/base/android/java/src/org/chromium/base/ |
D | LocaleUtils.java | 10 import android.os.LocaleList; 170 public static String toLanguageTags(LocaleList localeList) { in toLanguageTags() 219 return toLanguageTags(LocaleList.getDefault()); in getDefaultLocaleListString() 290 LocaleList updatedLocales = prependToLocaleList( in setConfigLocales() 296 LocaleList.setDefault(config.getLocales()); in setLocaleList() 306 static LocaleList prependToLocaleList(String languageTag, LocaleList localeList) { in prependToLocaleList() 314 return LocaleList.forLanguageTags( in prependToLocaleList()
|
/external/libtextclassifier/java/src/com/android/textclassifier/ |
D | ModelFileManagerImpl.java | 23 import android.os.LocaleList; 346 @Nullable LocaleList localePreferences, @Nullable LocaleList detectedLocales) { in findBestModelLocale() 351 LocaleList adjustedLocales = LocaleList.getAdjustedDefault(); in findBestModelLocale() 359 LocaleList filteredDeviceLocaleList = in findBestModelLocale() 360 LocaleList.forLanguageTags(String.join(",", filteredDeviceLocales)); in findBestModelLocale() 378 @Nullable LocaleList localePreferences, in findBestModelFile() 379 @Nullable LocaleList detectedLocales) { in findBestModelFile() 406 Locale.LanguageRange.parse(LocaleList.getDefault().toLanguageTags()); in findBestModelFile() 435 private static boolean isEmptyLocaleList(@Nullable LocaleList localeList) { in isEmptyLocaleList()
|
D | ModelFileManager.java | 19 import android.os.LocaleList; 42 @Nullable LocaleList localePreferences, in findBestModelFile() 43 @Nullable LocaleList detectedLocales); in findBestModelFile()
|
D | TextClassifierImpl.java | 28 import android.os.LocaleList; 165 final LocaleList detectedLocaleList = LocaleList.forLanguageTags(detectLanguageTags); in suggestSelection() 201 .setUserFamiliarLanguageTags(LocaleList.getDefault().toLanguageTags()) in suggestSelection() 244 final LocaleList detectedLocaleList = in classifyText() 245 LocaleList.forLanguageTags(String.join(",", detectLanguageTags)); in classifyText() 258 .setUserFamiliarLanguageTags(LocaleList.getDefault().toLanguageTags()) in classifyText() 299 final LocaleList detectedLocaleList = in generateLinks() 300 LocaleList.forLanguageTags(String.join(",", detectLanguageTags)); in generateLinks() 432 getAnnotatorImpl(LocaleList.getDefault(), /* detectedLocaleList= */ null)); in suggestConversationActions() 499 LocaleList requestLocaleList, LocaleList detectedLocaleList) throws IOException { in getAnnotatorModelFile() [all …]
|
/external/libchrome/base/android/javatests/src/org/chromium/base/ |
D | LocaleUtilsTest.java | 9 import android.os.LocaleList; 161 LocaleList localeList = new LocaleList(locale1, locale2); in testToLanguageTags() 167 localeList = new LocaleList(locale1, locale2); in testToLanguageTags() 173 localeList = new LocaleList(locale1, locale2); in testToLanguageTags() 179 localeList = new LocaleList(locale1, locale2); in testToLanguageTags() 184 localeList = new LocaleList(locale1); in testToLanguageTags()
|
/external/libtextclassifier/native/annotator/datetime/ |
D | parser.h | 44 const std::string& reference_timezone, const LocaleList& locale_list, 51 const std::string& reference_timezone, const LocaleList& locale_list,
|
D | grammar-parser.h | 50 const std::string& reference_timezone, const LocaleList& locale_list, 57 const std::string& reference_timezone, const LocaleList& locale_list,
|
/external/libchrome/base/android/java/src/org/chromium/base/ |
D | LocaleUtils.java | 9 import android.os.LocaleList; 165 public static String toLanguageTags(LocaleList localeList) { in toLanguageTags() 191 return toLanguageTags(LocaleList.getDefault()); in getDefaultLocaleListString()
|
/external/lottie/lottie/src/main/java/com/airbnb/lottie/animation/ |
D | LPaint.java | 9 import android.os.LocaleList; 38 public void setTextLocales(@NonNull LocaleList locales) { in setTextLocales()
|
/external/libtextclassifier/java/src/com/android/textclassifier/common/ |
D | ModelFile.java | 21 import android.os.LocaleList; 49 public final LocaleList supportedLocales; 98 ? LocaleList.getEmptyLocaleList() in ModelFile() 99 : LocaleList.forLanguageTags(supportedLocaleTags); in ModelFile()
|
/external/libtextclassifier/java/src/com/android/textclassifier/downloader/ |
D | ModelDownloadManager.java | 28 import android.os.LocaleList; 295 LocaleList.getAdjustedDefault().toLanguageTags(), in maybeOverrideLocaleListForTesting() 297 LocaleList.setDefault(LocaleList.forLanguageTags(localeList)); in maybeOverrideLocaleListForTesting()
|
/external/libtextclassifier/java/tests/instrumentation/src/com/android/textclassifier/common/base/ |
D | LocaleCompatTest.java | 21 import android.os.LocaleList; 59 .setLocales(LocaleList.forLanguageTags("zh-TW")); in getResourceLanguageTags_minApi24()
|
/external/cronet/base/android/java/src/org/chromium/base/compat/ |
D | ApiHelperForP.java | 13 import android.os.LocaleList; 80 TextSelection.Request.Builder builder, LocaleList defaultLocales) { in setDefaultLocales()
|
/external/robolectric/robolectric/src/test/java/org/robolectric/android/ |
D | BootstrapTest.java | 50 import android.os.LocaleList; 395 LocaleList originalDefault = LocaleList.getDefault(); in testUpdateDisplayResourcesWithDifferentLocale() 397 LocaleList.setDefault(new LocaleList(locale)); in testUpdateDisplayResourcesWithDifferentLocale() 407 LocaleList.setDefault(originalDefault); in testUpdateDisplayResourcesWithDifferentLocale()
|