[go: nahoru, domu]

Searched refs:locales (Results 1 - 25 of 29) sorted by relevance

12

/frameworks/base/core/tests/coretests/apks/locales/
H A DAndroid.mk6 LOCAL_PACKAGE_NAME := locales
/frameworks/base/core/java/android/text/style/
H A DLocaleSpan.java59 * @param locales The {@link LocaleList} of the text to which the span is attached.
60 * @throws NullPointerException if {@code locales} is null
62 public LocaleSpan(@NonNull LocaleList locales) { argument
63 Preconditions.checkNotNull(locales, "locales cannot be null");
64 mLocales = locales;
97 * @return The {@link Locale} for this span. If multiple locales are associated with this
109 * @return The entire list of locales that are associated with this span.
126 private static void apply(@NonNull Paint paint, @NonNull LocaleList locales) { argument
127 paint.setTextLocales(locales);
[all...]
/frameworks/base/packages/Osu/src/com/android/hotspot2/osu/
H A DOSUInfo.java72 Set<Locale> locales = new HashSet<>(mOSUProvider.getNames().size());
74 locales.add(name.getLocale());
76 return locales;
80 Set<Locale> locales = new HashSet<>(mOSUProvider.getServiceDescriptions().size());
82 locales.add(name.getLocale());
84 return locales;
88 Set<String> locales = new HashSet<>(mOSUProvider.getIcons().size());
90 locales.add(iconInfo.getLanguage());
92 return locales;
/frameworks/base/core/tests/coretests/src/com/android/internal/inputmethod/
H A DInputMethodUtilsTest.java492 // Make sure that secondary locales are taken into account to find the best matching
621 // provides multiple locales, we try to enable multiple subtypes.
819 private Context createTargetContextWithLocales(final LocaleList locales) { argument
821 resourceConfiguration.setLocales(locales);
827 private Resources getResourcesForLocales(Locale... locales) { argument
828 return createTargetContextWithLocales(new LocaleList(locales)).getResources();
1080 final ArrayList<Locale> locales =
1082 assertEquals(3, locales.size());
1083 assertEquals(LOCALE_EN_US, locales.get(0));
1084 assertEquals(LOCALE_EN_GB, locales
[all...]
/frameworks/base/core/java/com/android/internal/app/
H A DLocaleHelper.java30 * This class implements some handy methods to process with locales.
95 // For some locales we want to use a "dialect" form, for instance
155 * @param locales the list of locales whose names is to be displayed.
158 * @param maxLocales maximum number of locales to display. Generates ellipsis after that.
162 LocaleList locales, Locale displayLocale, @IntRange(from=1) int maxLocales) {
166 final boolean ellipsisNeeded = locales.size() > maxLocales;
172 listCount = localeCount = locales.size();
176 localeNames[i] = LocaleHelper.getDisplayName(locales.get(i), dispLocale, false);
208 * <p>Gives priority to suggested locales (t
161 getDisplayLocaleList( LocaleList locales, Locale displayLocale, @IntRange(from=1) int maxLocales) argument
[all...]
H A DLocalePicker.java103 final String[] locales = getSystemAssetLocales();
104 List<String> localeList = new ArrayList<String>(locales.length);
105 Collections.addAll(localeList, locales);
266 * Requests the system to update the list of system locales.
270 public static void updateLocales(LocaleList locales) { argument
275 config.setLocales(locales);
/frameworks/opt/telephony/src/java/com/android/internal/telephony/uicc/
H A DIccRecords.java527 String[] locales = mContext.getAssets().getLocales();
529 mPrefLang = findBestLanguage(efLi, locales);
536 mPrefLang = findBestLanguage(efPl, locales);
543 protected static String findBestLanguage(byte[] languages, String[] locales) argument
545 if ((languages == null) || (locales == null)) return null;
550 for (int j = 0; j < locales.length; j++) {
551 if (locales[j] != null && locales[j].length() >= 2 &&
552 locales[j].substring(0, 2).equalsIgnoreCase(lang)) {
H A DRuimRecords.java728 final String[] locales = ctx.getAssets().getLocales();
729 final String[] localeLangs = new String[locales.length];
730 for (int i = 0; i < locales.length; ++i) {
731 final String localeStr = locales[i];
/frameworks/base/core/java/android/hardware/input/
H A DKeyboardLayout.java53 LocaleList locales, int vid, int pid) {
58 mLocales = locales;
102 * Gets the locales that this keyboard layout is intended for.
52 KeyboardLayout(String descriptor, String label, String collection, int priority, LocaleList locales, int vid, int pid) argument
/frameworks/base/core/java/android/os/
H A DLocaleList.java34 * preferences for locales.
38 // This is a comma-separated list of the locales in the LocaleList created at construction time,
156 * @throws NullPointerException if any of the input locales is <code>null</code>.
157 * @throws IllegalArgumentException if any of the input locales repeat.
311 // The locales are not the same, but the languages are the same, and one of the locales
317 // If we can't guess a script, we don't know enough about the locales' language to find
318 // if the locales match. So we fall back to old behavior of matching, which considered
319 // locales with different regions different.
326 // There is no match if the two locales us
524 setDefault(@onNull @izemin=1) LocaleList locales) argument
536 setDefault(@onNull @izemin=1) LocaleList locales, int localeIndex) argument
[all...]
/frameworks/base/core/tests/coretests/src/android/content/res/
H A DResourcesLocaleTest.java59 "supported locales: " + Arrays.toString(supportedLocales),
66 final Resources resources = createResourcesWithApk(R.raw.locales);
83 final Resources resources = createResourcesWithApk(R.raw.locales);
/frameworks/base/core/java/android/hardware/soundtrigger/
H A DKeyphraseEnrollmentInfo.java234 // Get the supported locales.
245 ArraySet<Locale> locales = new ArraySet<>();
246 // Try adding locales if the locale string is non-empty.
251 locales.add(Locale.forLanguageTag(supportedLocalesDelimited[i]));
255 // to be affected by a malformed metadata because invalid locales were specified
275 return new KeyphraseMetadata(searchKeyphraseId, searchKeyphrase, locales, recognitionModes);
/frameworks/base/libs/androidfw/tests/
H A DResTable_test.cpp359 Vector<String8> locales; local
360 table.getLocales(&locales);
362 EXPECT_EQ(1, std::count(locales.begin(), locales.end(), String8("sv")));
/frameworks/base/core/java/com/android/internal/inputmethod/
H A DInputMethodUtils.java153 // some particular locales but "not default" for other locales.
163 // If no fallback locale is found in the above condition, find fallback locales regardless
613 // For each non-keyboard mode, extract subtypes with system locales.
1527 final ArrayList<Locale> locales = new ArrayList<>();
1529 locales.add(systemLocaleLanguageCountryVariant);
1541 locales.add(systemLocaleLanguageCountry);
1544 locales.add(LOCALE_EN_US);
1547 locales.add(LOCALE_EN_GB);
1549 locales
[all...]
/frameworks/base/core/java/android/content/res/
H A DResourcesImpl.java351 // If even after the update there are no Locales set, grab the default locales.
352 LocaleList locales = mConfiguration.getLocales();
353 if (locales.isEmpty()) {
354 locales = LocaleList.getDefault();
355 mConfiguration.setLocales(locales);
359 if (locales.size() > 1) {
364 // No app defined locales, so grab the system locales.
372 final Locale bestLocale = locales.getFirstMatchWithEnglishSupported(
374 if (bestLocale != null && bestLocale != locales
[all...]
H A DConfiguration.java1444 * Get the locale list. This is the preferred way for getting the locales (instead of using
1455 * Set the locale list. This is the preferred way for setting up the locales (instead of using
1463 * @param locales The locale list. If null, an empty LocaleList will be assigned.
1465 public void setLocales(@Nullable LocaleList locales) { argument
1466 mLocaleList = locales == null ? LocaleList.getEmptyLocaleList() : locales;
1910 private static final String XML_ATTR_LOCALES = "locales";
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
H A DMccTable.java236 * TODO: This should really follow the CLDR chain of parent locales! That might be a bit
280 List<String> locales = new ArrayList<>(Arrays.asList(localeArray));
283 locales.remove("ar-XB");
284 locales.remove("en-XA");
287 for (String locale : locales) {
290 // Only consider locales with both language and country.
314 Slog.d(LOG_TAG, "getLocaleForLanguageCountry: no locales for language " +
/frameworks/base/libs/androidfw/
H A DAssetManager.cpp382 Vector<String8> locales; local
385 res->getLocales(&locales);
387 const size_t localesSize = locales.size();
390 if (locales[i].find(kFilPrefix) == 0) {
815 void AssetManager::getLocales(Vector<String8>* locales, bool includeSystemLocales) const argument
819 res->getLocales(locales, includeSystemLocales);
822 const size_t numLocales = locales->size();
824 const String8& localeStr = locales->itemAt(i);
828 locales->editItemAt(i) = replaced;
/frameworks/base/graphics/java/android/graphics/
H A DPaint.java1339 * the order those locales appear in the list is considered for deciding the font.
1346 * system locales. This assumes that the text to be rendered will most likely be in the user's
1352 * the text locale here. Specifying the text locales just helps it do a better
1355 * @param locales the paint's locale list for drawing text, must not be null or empty.
1357 public void setTextLocales(@NonNull @Size(min=1) LocaleList locales) { argument
1358 if (locales == null || locales.isEmpty()) {
1359 throw new IllegalArgumentException("locales cannot be null or empty");
1361 if (locales.equals(mLocales)) return;
1362 mLocales = locales;
2676 nSetTextLocales(long paintPtr, String locales) argument
[all...]
/frameworks/base/services/core/java/com/android/server/input/
H A DInputManagerService.java785 final LocaleList locales = layout.getLocales();
786 final int numLocales = locales.size();
788 if (isCompatibleLocale(systemLocale, locales.get(localeIndex))) {
806 final LocaleList locales = layout.getLocales();
807 final int numLocales = locales.size();
809 final Locale locale = locales.get(localeIndex);
819 final LocaleList locales = layout.getLocales();
820 final int numLocales = locales.size();
822 final Locale locale = locales.get(localeIndex);
1185 LocaleList locales
[all...]
/frameworks/base/include/androidfw/
H A DAssetManager.h227 * Get the known locales for this asset manager object.
229 void getLocales(Vector<String8>* locales, bool includeSystemLocales=true) const;
/frameworks/base/tools/aapt/
H A DCommand.cpp915 Vector<String8> locales; local
916 res.getLocales(&locales);
1244 const size_t NL = locales.size();
1246 const char* localeStr = locales[i].string();
2174 printf("locales:");
2175 const size_t NL = locales.size();
2177 const char* localeStr = locales[i].string();
/frameworks/base/core/java/android/speech/tts/
H A DTextToSpeech.java1598 HashSet<Locale> locales = new HashSet<Locale>();
1600 locales.add(voice.getLocale());
1602 return locales;
/frameworks/base/core/jni/
H A Dandroid_util_AssetManager.cpp583 Vector<String8> locales; local
590 am->getLocales(&locales, includeSystemLocales);
592 const int N = locales.size();
600 jstring str = env->NewStringUTF(locales[i].string());
613 return getLocales(env, clazz, true /* include system locales */);
618 return getLocales(env, clazz, false /* don't include system locales */);
/frameworks/base/core/jni/android/graphics/
H A DPaint.cpp319 static jint setTextLocales(JNIEnv* env, jobject clazz, jlong objHandle, jstring locales) { argument
321 ScopedUtfChars localesChars(env, locales);

Completed in 4480 milliseconds

12