/frameworks/base/core/tests/coretests/src/com/android/internal/inputmethod/ |
D | InputMethodUtilsTest.java | 788 private Context createTargetContextWithLocales(final LocaleList locales) { in createTargetContextWithLocales() argument 790 resourceConfiguration.setLocales(locales); in createTargetContextWithLocales() 796 private Resources getResourcesForLocales(Locale... locales) { in getResourcesForLocales() argument 797 return createTargetContextWithLocales(new LocaleList(locales)).getResources(); in getResourcesForLocales() 1049 final ArrayList<Locale> locales = in testGetSuitableLocalesForSpellChecker() local 1051 assertEquals(3, locales.size()); in testGetSuitableLocalesForSpellChecker() 1052 assertEquals(LOCALE_EN_US, locales.get(0)); in testGetSuitableLocalesForSpellChecker() 1053 assertEquals(LOCALE_EN_GB, locales.get(1)); in testGetSuitableLocalesForSpellChecker() 1054 assertEquals(LOCALE_EN, locales.get(2)); in testGetSuitableLocalesForSpellChecker() 1058 final ArrayList<Locale> locales = in testGetSuitableLocalesForSpellChecker() local [all …]
|
/frameworks/base/core/java/android/text/style/ |
D | LocaleSpan.java | 62 public LocaleSpan(@NonNull LocaleList locales) { in LocaleSpan() argument 63 Preconditions.checkNotNull(locales, "locales cannot be null"); in LocaleSpan() 64 mLocales = locales; in LocaleSpan() 126 private static void apply(@NonNull Paint paint, @NonNull LocaleList locales) { in apply() argument 127 paint.setTextLocales(locales); in apply()
|
/frameworks/base/packages/Osu/src/com/android/hotspot2/flow/ |
D | OSUInfo.java | 76 Set<Locale> locales = new HashSet<>(mOSUProvider.getNames().size()); in getNameLocales() local 78 locales.add(name.getLocale()); in getNameLocales() 80 return locales; in getNameLocales() 84 Set<Locale> locales = new HashSet<>(mOSUProvider.getServiceDescriptions().size()); in getServiceLocales() local 86 locales.add(name.getLocale()); in getServiceLocales() 88 return locales; in getServiceLocales() 92 Set<String> locales = new HashSet<>(mOSUProvider.getIcons().size()); in getIconLanguages() local 94 locales.add(iconInfo.getLanguage()); in getIconLanguages() 96 return locales; in getIconLanguages()
|
/frameworks/base/core/java/android/os/ |
D | LocaleList.java | 524 public static void setDefault(@NonNull @Size(min=1) LocaleList locales) { in setDefault() 525 setDefault(locales, 0); in setDefault() 536 public static void setDefault(@NonNull @Size(min=1) LocaleList locales, int localeIndex) { in setDefault() 537 if (locales == null) { in setDefault() 540 if (locales.isEmpty()) { in setDefault() 544 sLastDefaultLocale = locales.get(localeIndex); in setDefault() 546 sLastExplicitlySetLocaleList = locales; in setDefault() 547 sDefaultLocaleList = locales; in setDefault()
|
/frameworks/support/compat/java/android/support/v4/os/ |
D | LocaleListHelper.java | 550 static void setDefault(@NonNull @Size(min = 1) LocaleListHelper locales) { in setDefault() 551 setDefault(locales, 0); in setDefault() 563 static void setDefault(@NonNull @Size(min = 1) LocaleListHelper locales, in setDefault() 565 if (locales == null) { in setDefault() 568 if (locales.isEmpty()) { in setDefault() 572 sLastDefaultLocale = locales.get(localeIndex); in setDefault() 574 sLastExplicitlySetLocaleList = locales; in setDefault() 575 sDefaultLocaleList = locales; in setDefault()
|
/frameworks/base/core/java/com/android/internal/app/ |
D | LocaleHelper.java | 162 LocaleList locales, Locale displayLocale, @IntRange(from=1) int maxLocales) { in getDisplayLocaleList() argument 166 final boolean ellipsisNeeded = locales.size() > maxLocales; in getDisplayLocaleList() 172 listCount = localeCount = locales.size(); in getDisplayLocaleList() 176 localeNames[i] = LocaleHelper.getDisplayName(locales.get(i), dispLocale, false); in getDisplayLocaleList()
|
D | LocalePicker.java | 103 final String[] locales = getSystemAssetLocales(); in getAllAssetLocales() local 104 List<String> localeList = new ArrayList<String>(locales.length); in getAllAssetLocales() 105 Collections.addAll(localeList, locales); in getAllAssetLocales() 270 public static void updateLocales(LocaleList locales) { 275 config.setLocales(locales);
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/uicc/ |
D | IccRecords.java | 554 String[] locales = mContext.getAssets().getLocales(); in setSimLanguage() local 556 mPrefLang = findBestLanguage(efLi, locales); in setSimLanguage() 563 mPrefLang = findBestLanguage(efPl, locales); in setSimLanguage() 570 protected static String findBestLanguage(byte[] languages, String[] locales) in findBestLanguage() argument 572 if ((languages == null) || (locales == null)) return null; in findBestLanguage() 577 for (int j = 0; j < locales.length; j++) { in findBestLanguage() 578 if (locales[j] != null && locales[j].length() >= 2 && in findBestLanguage() 579 locales[j].substring(0, 2).equalsIgnoreCase(lang)) { in findBestLanguage()
|
D | RuimRecords.java | 728 final String[] locales = ctx.getAssets().getLocales(); in getAssetLanguages() local 729 final String[] localeLangs = new String[locales.length]; in getAssetLanguages() 730 for (int i = 0; i < locales.length; ++i) { in getAssetLanguages() 731 final String localeStr = locales[i]; in getAssetLanguages()
|
/frameworks/base/libs/androidfw/tests/ |
D | AssetManager2_bench.cpp | 221 std::set<std::string> locales = in BM_AssetManagerGetResourceLocales() local 223 benchmark::DoNotOptimize(locales); in BM_AssetManagerGetResourceLocales() 239 Vector<String8> locales; in BM_AssetManagerGetResourceLocalesOld() local 240 table.getLocales(&locales, true /*includeSystemLocales*/, true /*mergeEquivalentLangs*/); in BM_AssetManagerGetResourceLocalesOld() 241 benchmark::DoNotOptimize(locales); in BM_AssetManagerGetResourceLocalesOld()
|
D | AssetManager2_test.cpp | 403 std::set<std::string> locales = assetmanager.GetResourceLocales(); in TEST_F() local 406 EXPECT_EQ(3u, locales.size()); in TEST_F() 407 EXPECT_GT(locales.count("sv"), 0u); in TEST_F() 408 EXPECT_GT(locales.count("de"), 0u); in TEST_F() 409 EXPECT_GT(locales.count("fr"), 0u); in TEST_F() 411 locales = assetmanager.GetResourceLocales(true /*exclude_system*/); in TEST_F() 413 EXPECT_EQ(2u, locales.size()); in TEST_F() 414 EXPECT_GT(locales.count("de"), 0u); in TEST_F() 415 EXPECT_GT(locales.count("fr"), 0u); in TEST_F()
|
D | ResTable_test.cpp | 421 Vector<String8> locales; in TEST() local 422 table.getLocales(&locales); in TEST() 424 EXPECT_EQ(1, std::count(locales.begin(), locales.end(), String8("sv"))); in TEST()
|
/frameworks/base/core/java/android/hardware/input/ |
D | KeyboardLayout.java | 53 LocaleList locales, int vid, int pid) { in KeyboardLayout() argument 58 mLocales = locales; in KeyboardLayout()
|
/frameworks/base/core/tests/coretests/src/android/content/res/ |
D | ResourcesLocaleTest.java | 66 final Resources resources = createResourcesWithApk(R.raw.locales); in testEnglishIsAlwaysConsideredSupported() 83 final Resources resources = createResourcesWithApk(R.raw.locales); in testSelectFirstSupportedLanguage()
|
/frameworks/base/core/java/com/android/internal/inputmethod/ |
D | InputMethodUtils.java | 1463 final ArrayList<Locale> locales = new ArrayList<>(); in getSuitableLocalesForSpellChecker() local 1465 locales.add(systemLocaleLanguageCountryVariant); in getSuitableLocalesForSpellChecker() 1477 locales.add(systemLocaleLanguageCountry); in getSuitableLocalesForSpellChecker() 1480 locales.add(LOCALE_EN_US); in getSuitableLocalesForSpellChecker() 1483 locales.add(LOCALE_EN_GB); in getSuitableLocalesForSpellChecker() 1485 locales.add(Locale.ENGLISH); in getSuitableLocalesForSpellChecker() 1492 locales.add(Locale.ENGLISH); in getSuitableLocalesForSpellChecker() 1493 locales.add(LOCALE_EN_US); in getSuitableLocalesForSpellChecker() 1494 locales.add(LOCALE_EN_GB); in getSuitableLocalesForSpellChecker() 1504 locales.add(systemLocaleLanguageCountry); in getSuitableLocalesForSpellChecker() [all …]
|
/frameworks/base/core/tests/coretests/apks/locales/ |
D | Android.mk | 6 LOCAL_PACKAGE_NAME := locales
|
/frameworks/base/core/tests/coretests/src/android/text/format/ |
D | DateUtilsTest.java | 106 private void setLocales(LocaleList locales) { in setLocales() argument 109 config.setLocales(locales); in setLocales()
|
/frameworks/base/core/java/android/widget/ |
D | SelectionActionModeHelper.java | 416 CharSequence text, int selectionStart, int selectionEnd, LocaleList locales) { in TextClassificationHelper() argument 417 reset(textClassifier, text, selectionStart, selectionEnd, true, locales); in TextClassificationHelper() 423 boolean resetSelectionTag, LocaleList locales) { in reset() argument 430 mLocales = locales; in reset()
|
/frameworks/base/core/java/android/hardware/soundtrigger/ |
D | KeyphraseEnrollmentInfo.java | 247 ArraySet<Locale> locales = new ArraySet<>(); in getKeyphraseFromTypedArray() local 253 locales.add(Locale.forLanguageTag(supportedLocalesDelimited[i])); in getKeyphraseFromTypedArray() 277 return new KeyphraseMetadata(searchKeyphraseId, searchKeyphrase, locales, recognitionModes); in getKeyphraseFromTypedArray()
|
/frameworks/base/core/java/android/content/res/ |
D | ResourcesImpl.java | 357 LocaleList locales = mConfiguration.getLocales(); in updateConfiguration() local 358 if (locales.isEmpty()) { in updateConfiguration() 359 locales = LocaleList.getDefault(); in updateConfiguration() 360 mConfiguration.setLocales(locales); in updateConfiguration() 364 if (locales.size() > 1) { in updateConfiguration() 377 final Locale bestLocale = locales.getFirstMatchWithEnglishSupported( in updateConfiguration() 379 if (bestLocale != null && bestLocale != locales.get(0)) { in updateConfiguration() 380 mConfiguration.setLocales(new LocaleList(bestLocale, locales)); in updateConfiguration()
|
/frameworks/base/apct-tests/perftests/core/src/android/widget/ |
D | TextViewSetTextLocalePerfTest.java | 45 public static Collection locales() { in locales() method in TextViewSetTextLocalePerfTest
|
/frameworks/base/core/proto/android/content/ |
D | configuration.proto | 33 repeated LocaleProto locales = 4; field
|
/frameworks/base/services/core/java/com/android/server/input/ |
D | InputManagerService.java | 813 final LocaleList locales = layout.getLocales(); in getDefaultKeyboardLayout() 814 final int numLocales = locales.size(); in getDefaultKeyboardLayout() 816 if (isCompatibleLocale(systemLocale, locales.get(localeIndex))) { in getDefaultKeyboardLayout() 834 final LocaleList locales = layout.getLocales(); in getDefaultKeyboardLayout() local 835 final int numLocales = locales.size(); in getDefaultKeyboardLayout() 837 final Locale locale = locales.get(localeIndex); in getDefaultKeyboardLayout() 847 final LocaleList locales = layout.getLocales(); in getDefaultKeyboardLayout() local 848 final int numLocales = locales.size(); in getDefaultKeyboardLayout() 850 final Locale locale = locales.get(localeIndex); in getDefaultKeyboardLayout() 1213 LocaleList locales = getLocalesFromLanguageTags(languageTags); in visitKeyboardLayoutsInPackage() local [all …]
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
D | MccTable.java | 302 List<String> locales = new ArrayList<>(Arrays.asList(localeArray)); in getLocaleForLanguageCountry() local 305 locales.remove("ar-XB"); in getLocaleForLanguageCountry() 306 locales.remove("en-XA"); in getLocaleForLanguageCountry() 309 for (String locale : locales) { in getLocaleForLanguageCountry()
|
/frameworks/base/graphics/java/android/graphics/ |
D | Paint.java | 1352 public void setTextLocales(@NonNull @Size(min=1) LocaleList locales) { in setTextLocales() 1353 if (locales == null || locales.isEmpty()) { in setTextLocales() 1356 if (locales.equals(mLocales)) return; in setTextLocales() 1357 mLocales = locales; in setTextLocales() 2791 private static native int nSetTextLocales(long paintPtr, String locales); in nSetTextLocales() argument
|