/frameworks/base/services/tests/servicestests/src/com/android/server/textservices/ |
D | LocaleUtilsTest.java | 49 final ArrayList<Locale> locales = in testGetSuitableLocalesForSpellChecker() local 51 assertEquals(3, locales.size()); in testGetSuitableLocalesForSpellChecker() 52 assertEquals(LOCALE_EN_US, locales.get(0)); in testGetSuitableLocalesForSpellChecker() 53 assertEquals(LOCALE_EN_GB, locales.get(1)); in testGetSuitableLocalesForSpellChecker() 54 assertEquals(LOCALE_EN, locales.get(2)); in testGetSuitableLocalesForSpellChecker() 58 final ArrayList<Locale> locales = in testGetSuitableLocalesForSpellChecker() local 60 assertEquals(3, locales.size()); in testGetSuitableLocalesForSpellChecker() 61 assertEquals(LOCALE_EN_GB, locales.get(0)); in testGetSuitableLocalesForSpellChecker() 62 assertEquals(LOCALE_EN_US, locales.get(1)); in testGetSuitableLocalesForSpellChecker() 63 assertEquals(LOCALE_EN, locales.get(2)); in testGetSuitableLocalesForSpellChecker() [all …]
|
/frameworks/base/services/core/java/com/android/server/textservices/ |
D | LocaleUtils.java | 100 final ArrayList<Locale> locales = new ArrayList<>(); in getSuitableLocalesForSpellChecker() local 102 locales.add(systemLocaleLanguageCountryVariant); in getSuitableLocalesForSpellChecker() 114 locales.add(systemLocaleLanguageCountry); in getSuitableLocalesForSpellChecker() 117 locales.add(Locale.US); in getSuitableLocalesForSpellChecker() 120 locales.add(Locale.UK); in getSuitableLocalesForSpellChecker() 122 locales.add(Locale.ENGLISH); in getSuitableLocalesForSpellChecker() 129 locales.add(Locale.ENGLISH); in getSuitableLocalesForSpellChecker() 130 locales.add(Locale.US); in getSuitableLocalesForSpellChecker() 131 locales.add(Locale.UK); in getSuitableLocalesForSpellChecker() 141 locales.add(systemLocaleLanguageCountry); in getSuitableLocalesForSpellChecker() [all …]
|
/frameworks/minikin/libs/minikin/ |
D | LocaleListCache.cpp | 110 size_t LocaleListCache::LocaleVectorHash::operator()(const std::vector<Locale>& locales) const { in operator ()() 112 for (const auto& locale : locales) { in operator ()() 128 uint32_t LocaleListCache::getIdInternal(const std::string& locales) { in getIdInternal() argument 130 const auto& it = mLocaleListStringCache.find(locales); in getIdInternal() 134 uint32_t id = getIdInternal(parseLocaleList(locales)); in getIdInternal() 135 mLocaleListStringCache.emplace(locales, id); in getIdInternal() 139 uint32_t LocaleListCache::getIdInternal(std::vector<Locale>&& locales) { in getIdInternal() argument 140 if (locales.empty()) { in getIdInternal() 143 const auto& it = mLocaleListLookupTable.find(locales); in getIdInternal() 150 mLocaleListLookupTable.emplace(locales, nextId); in getIdInternal() [all …]
|
D | LocaleListCache.h | 36 static inline uint32_t getId(const std::string& locales) { in getId() argument 37 return getInstance().getIdInternal(locales); in getId() 55 size_t operator()(const std::vector<Locale>& locales) const; 61 uint32_t getIdInternal(const std::string& locales); 62 uint32_t getIdInternal(std::vector<Locale>&& locales) EXCLUSIVE_LOCKS_REQUIRED(mMutex);
|
/frameworks/base/services/core/java/com/android/server/locales/ |
D | LocaleManagerService.java | 17 package com.android.server.locales; 147 @NonNull LocaleList locales) throws RemoteException { in setApplicationLocales() argument 148 LocaleManagerService.this.setApplicationLocales(appPackageName, userId, locales); in setApplicationLocales() 178 @NonNull LocaleList locales) throws RemoteException, IllegalArgumentException { in setApplicationLocales() argument 183 requireNonNull(locales); in setApplicationLocales() 184 atomRecordForMetrics.setNewLocales(locales.toLanguageTags()); in setApplicationLocales() 205 setApplicationLocalesUnchecked(appPackageName, userId, locales, in setApplicationLocales() 216 @UserIdInt int userId, @NonNull LocaleList locales, in setApplicationLocalesUnchecked() argument 228 boolean isConfigChanged = updater.setLocales(locales).commit(); in setApplicationLocalesUnchecked() 232 notifyAppWhoseLocaleChanged(appPackageName, userId, locales); in setApplicationLocalesUnchecked() [all …]
|
D | LocaleManagerShellCommand.java | 17 package com.android.server.locales; 79 LocaleList locales = LocaleList.getEmptyLocaleList(); in runSetAppLocales() local 91 locales = parseLocales(); in runSetAppLocales() 101 mBinderService.setApplicationLocales(packageName, userId, locales); in runSetAppLocales() 134 LocaleList locales = mBinderService.getApplicationLocales(packageName, userId); in runGetAppLocales() local 136 + " for user " + userId + " are [" + locales.toLanguageTags() + "]"); in runGetAppLocales() 156 LocaleList locales = LocaleList.forLanguageTags(inputLocales); in parseLocales() local 157 return locales; in parseLocales()
|
/frameworks/minikin/tests/unittest/ |
D | FontLanguageListCacheTest.cpp | 54 const LocaleList& locales = LocaleListCache::getById(LocaleListCache::getId("en")); in TEST() local 55 ASSERT_EQ(1UL, locales.size()); in TEST() 56 EXPECT_EQ(english, locales[0]); in TEST() 65 std::string locales[] = {"en", "jp", "en,zh-Hans"}; in TEST() local 68 for (const std::string& locale : locales) { in TEST() 74 for (const std::string& locale : locales) { in TEST() 79 for (const std::string& locale : locales) { in TEST()
|
/frameworks/base/telephony/java/android/telephony/mbms/ |
D | ServiceInfo.java | 46 private final List<Locale> locales; field in ServiceInfo 69 locales = new ArrayList(newLocales); in ServiceInfo() 92 locales = new ArrayList<Locale>(localesCount); in ServiceInfo() 95 locales.add(l); in ServiceInfo() 111 int localesCount = locales.size(); in writeToParcel() 113 for (Locale l : locales) { in writeToParcel() 159 return locales; in getLocales() 195 Objects.equals(locales, that.locales) && in equals() 203 return Objects.hash(names, className, locales, serviceId, sessionStartTime, sessionEndTime); in hashCode()
|
D | StreamingServiceInfo.java | 45 List<Locale> locales, String serviceId, Date start, Date end) { in StreamingServiceInfo() argument 46 super(names, className, locales, serviceId, start, end); in StreamingServiceInfo()
|
/frameworks/base/core/java/android/app/ |
D | LocaleManager.java | 73 public void setApplicationLocales(@NonNull LocaleList locales) { in setApplicationLocales() argument 74 setApplicationLocales(mContext.getPackageName(), locales); in setApplicationLocales() local 102 public void setApplicationLocales(@NonNull String appPackageName, @NonNull LocaleList locales) { in setApplicationLocales() argument 105 locales); in setApplicationLocales() 174 public void setSystemLocales(@NonNull LocaleList locales) { in setSystemLocales() argument 177 conf.setLocales(locales); in setSystemLocales()
|
/frameworks/base/tests/LocalizationTest/java/com/android/internal/app/ |
D | LocalizationTest.kt | 76 val locales = LocalePicker.getSupportedLocales(mContext) in testGetSupportedLocales_invalidFilter() constant 78 assertThat(locales).isEqualTo(mUnfilteredLocales) in testGetSupportedLocales_invalidFilter() 85 val locales = LocalePicker.getSupportedLocales(mContext) in testGetSupportedLocales_inclusiveFilter() constant 87 assertThat(locales).isEqualTo( in testGetSupportedLocales_inclusiveFilter() 98 val locales = LocalePicker.getSupportedLocales(mContext) in testGetSupportedLocales_exclusiveFilter() constant 100 assertThat(locales).isEqualTo( in testGetSupportedLocales_exclusiveFilter()
|
/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/services/tests/servicestests/src/com/android/server/locales/ |
D | LocaleManagerServiceTest.java | 17 package com.android.server.locales; 235 LocaleList locales = mLocaleManagerService.getApplicationLocales( in testGetApplicationLocales_appSpecificConfigAbsent_returnsEmptyList() local 238 assertEquals(LocaleList.getEmptyLocaleList(), locales); in testGetApplicationLocales_appSpecificConfigAbsent_returnsEmptyList() local 250 LocaleList locales = mLocaleManagerService.getApplicationLocales( in testGetApplicationLocales_appSpecificLocalesAbsent_returnsEmptyList() local 253 assertEquals(LocaleList.getEmptyLocaleList(), locales); in testGetApplicationLocales_appSpecificLocalesAbsent_returnsEmptyList() local 264 LocaleList locales = in testGetApplicationLocales_callerOwnsAppAndConfigPresent_returnsLocales() local 267 assertEquals(DEFAULT_LOCALES, locales); in testGetApplicationLocales_callerOwnsAppAndConfigPresent_returnsLocales() 279 LocaleList locales = in testGetApplicationLocales_arbitraryCallerWithPermissions_returnsLocales() local 282 assertEquals(DEFAULT_LOCALES, locales); in testGetApplicationLocales_arbitraryCallerWithPermissions_returnsLocales() 295 LocaleList locales = in testGetApplicationLocales_callerIsInstaller_returnsLocales() local [all …]
|
D | FakePackageConfigurationUpdater.java | 17 package com.android.server.locales; 40 public PackageConfigurationUpdater setLocales(LocaleList locales) { in setLocales() argument 41 mLocales = locales; in setLocales()
|
D | OWNERS | 1 include /services/core/java/com/android/server/locales/OWNERS
|
/frameworks/base/core/java/com/android/internal/app/ |
D | LocalePicker.java | 140 final String[] locales = getSystemAssetLocales(); in getAllAssetLocales() local 141 List<String> localeList = new ArrayList<String>(locales.length); in getAllAssetLocales() 142 Collections.addAll(localeList, locales); in getAllAssetLocales() 306 public static void updateLocales(LocaleList locales) { 307 if (locales != null) { 308 locales = removeExcludedLocales(locales); 315 config.setLocales(locales); 328 private static LocaleList removeExcludedLocales(@NonNull LocaleList locales) { 331 return locales; 334 int localeCount = locales.size(); [all …]
|
D | LocaleHelper.java | 146 LocaleList locales, Locale displayLocale, @IntRange(from=1) int maxLocales) { in getDisplayLocaleList() argument 150 final boolean ellipsisNeeded = locales.size() > maxLocales; in getDisplayLocaleList() 156 listCount = localeCount = locales.size(); in getDisplayLocaleList() 160 localeNames[i] = LocaleHelper.getDisplayName(locales.get(i), dispLocale, false); in getDisplayLocaleList()
|
D | AppLocaleStore.java | 91 String[] locales = packageManager.getResourcesForApplication( in getAssetLocales() local 94 if (locales == null) { in getAssetLocales() 96 } else if (locales.length <= 0) { in getAssetLocales() 99 for (String language : locales) { in getAssetLocales()
|
/frameworks/base/core/java/android/os/ |
D | LocaleList.java | 547 public static void setDefault(@NonNull @Size(min=1) LocaleList locales) { in setDefault() 548 setDefault(locales, 0); in setDefault() 560 public static void setDefault(@NonNull @Size(min=1) LocaleList locales, int localeIndex) { in setDefault() 561 if (locales == null) { in setDefault() 564 if (locales.isEmpty()) { in setDefault() 568 sLastDefaultLocale = locales.get(localeIndex); in setDefault() 570 sLastExplicitlySetLocaleList = locales; in setDefault() 571 sDefaultLocaleList = locales; in setDefault()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/util/ |
D | LocaleUtils.java | 88 List<String> locales = new ArrayList<>(Arrays.asList(localeArray)); in getLocaleForLanguageCountry() local 91 locales.remove("ar-XB"); in getLocaleForLanguageCountry() 92 locales.remove("en-XA"); in getLocaleForLanguageCountry() 95 for (String locale : locales) { in getLocaleForLanguageCountry()
|
/frameworks/base/libs/androidfw/tests/ |
D | AssetManager2_bench.cpp | 194 std::set<std::string> locales = in BM_AssetManagerGetResourceLocales() local 196 benchmark::DoNotOptimize(locales); in BM_AssetManagerGetResourceLocales() 212 Vector<String8> locales; in BM_AssetManagerGetResourceLocalesOld() local 213 table.getLocales(&locales, true /*includeSystemLocales*/, true /*mergeEquivalentLangs*/); in BM_AssetManagerGetResourceLocalesOld() 214 benchmark::DoNotOptimize(locales); in BM_AssetManagerGetResourceLocalesOld()
|
/frameworks/base/core/tests/coretests/src/android/text/format/ |
D | TimeMigrationUtilsTest.java | 77 Locale[] locales = new Locale[] { in formatMillisAsDateTime_matchesOldBehavior() local 102 for (Locale locale : locales) { in formatMillisAsDateTime_matchesOldBehavior()
|
/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 | 69 final Resources resources = createResourcesWithApk(R.raw.locales); in testEnglishIsAlwaysConsideredSupported() 86 final Resources resources = createResourcesWithApk(R.raw.locales); in testSelectFirstSupportedLanguage()
|
/frameworks/base/services/core/java/com/android/server/wm/ |
D | PackageConfigurationUpdaterImpl.java | 63 setLocales(LocaleList locales) { in setLocales() argument 65 mLocales = locales; in setLocales()
|