/frameworks/support/leanback/src/main/java/androidx/leanback/widget/picker/ |
H A D | PickerUtility.java | 27 * Utility class that provides Date/Time related constants as well as locale-specific calendar for 36 public final Locale locale; field in class:PickerUtility.DateConstant 40 private DateConstant(Locale locale, Resources resources) { argument 41 this.locale = locale; 42 DateFormatSymbols symbols = DateFormatSymbols.getInstance(locale); 44 Calendar calendar = Calendar.getInstance(locale); 51 public final Locale locale; field in class:PickerUtility.TimeConstant 57 private TimeConstant(Locale locale, Resources resources) { argument 58 this.locale 67 getDateConstantInstance(Locale locale, Resources resources) argument 71 getTimeConstantInstance(Locale locale, Resources resources) argument 88 getCalendarForLocale(Calendar oldCalendar, Locale locale) argument [all...] |
/frameworks/base/tools/localedata/ |
H A D | extract_icu_data.py | 18 """Generate a C++ data table containing locale data.""" 26 def get_locale_parts(locale): 27 """Split a locale into three parts, for langauge, script, and region.""" 28 parts = locale.split('_') 111 def pack_to_uint32(locale): 112 """Pack language+region of locale into a 32-bit unsigned integer.""" 113 lang, _, region = get_locale_parts(locale) 133 for locale in sorted(likely_script_dict.keys()): 134 script = likely_script_dict[locale] 136 pack_to_uint32(locale), [all...] |
/frameworks/base/core/java/android/text/method/ |
H A D | DateTimeKeyListener.java | 67 public DateTimeKeyListener(@Nullable Locale locale) { argument 71 final boolean success = NumberKeyListener.addDigits(chars, locale) 72 && NumberKeyListener.addAmPmChars(chars, locale) 74 chars, locale, SKELETON_12HOUR, SYMBOLS_TO_IGNORE) 76 chars, locale, SKELETON_24HOUR, SYMBOLS_TO_IGNORE); 79 if (locale != null && "en".equals(locale.getLanguage())) { 103 * Returns an instance of DateTimeKeyListener appropriate for the given locale. 106 public static DateTimeKeyListener getInstance(@Nullable Locale locale) { argument 109 instance = sInstanceCache.get(locale); [all...] |
H A D | TimeKeyListener.java | 67 public TimeKeyListener(@Nullable Locale locale) { argument 71 final boolean success = NumberKeyListener.addDigits(chars, locale) 72 && NumberKeyListener.addAmPmChars(chars, locale) 74 chars, locale, SKELETON_12HOUR, SYMBOLS_TO_IGNORE) 76 chars, locale, SKELETON_24HOUR, SYMBOLS_TO_IGNORE); 79 if (locale != null && "en".equals(locale.getLanguage())) { 103 * Returns an instance of TimeKeyListener appropriate for the given locale. 106 public static TimeKeyListener getInstance(@Nullable Locale locale) { argument 109 instance = sInstanceCache.get(locale); [all...] |
H A D | DateKeyListener.java | 65 public DateKeyListener(@Nullable Locale locale) { argument 69 final boolean success = NumberKeyListener.addDigits(chars, locale) 71 chars, locale, SKELETONS, SYMBOLS_TO_IGNORE); 91 * Returns an instance of DateKeyListener appropriate for the given locale. 94 public static DateKeyListener getInstance(@Nullable Locale locale) { argument 97 instance = sInstanceCache.get(locale); 99 instance = new DateKeyListener(locale); 100 sInstanceCache.put(locale, instance);
|
H A D | AllCapsTransformationMethod.java | 31 * Transforms source text into an ALL CAPS string, locale-aware. 56 Locale locale = null; 58 locale = ((TextView)view).getTextLocale(); 60 if (locale == null) { 61 locale = mLocale; 64 return TextUtils.toUpperCase(locale, source, copySpans);
|
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/android/ |
H A D | AndroidLocale.java | 35 public static String toLanguageTag(Locale locale) { argument 36 return ULocale.forLocale(locale).toLanguageTag(); 58 public static String getScript(Locale locale) { argument 59 return ULocale.forLocale(locale).getScript(); 65 Locale locale = context.getConfiguration().locale; 66 if (locale != null) { 67 return locale;
|
/frameworks/base/core/java/com/android/internal/app/ |
H A D | LocaleHelper.java | 56 * BreakIterator breakIterator = BreakIterator.getSentenceInstance(locale); 57 * String result = UCharacter.toTitleCase(locale, 61 * <p>That also means creating a BreakIterator for each locale. Expensive...</p> 64 * @param locale the locale used for the case conversion. 67 public static String toSentenceCase(String str, Locale locale) { argument 72 return str.substring(0, firstCodePointLen).toUpperCase(locale) 77 * Normalizes a string for locale name search. Does case conversion for now, 80 * <p>Warning: it is only intended to be used in searches by the locale picker. 84 * @param locale th 87 normalizeForSearch(String str, Locale locale) argument 97 shouldUseDialectName(Locale locale) argument 112 getDisplayName(Locale locale, Locale displayLocale, boolean sentenceCase) argument 127 getDisplayName(Locale locale, boolean sentenceCase) argument 138 getDisplayCountry(Locale locale, Locale displayLocale) argument 157 getDisplayCountry(Locale locale) argument 206 addLikelySubtags(Locale locale) argument 241 removePrefixForCompare(Locale locale, String str) argument [all...] |
H A D | LocalePicker.java | 53 public void onLocaleSelected(Locale locale); argument 62 final Locale locale; field in class:LocalePicker.LocaleInfo 64 public LocaleInfo(String label, Locale locale) { argument 66 this.locale = locale; 74 return locale; 108 for (String locale : localeList) { 109 final Locale l = Locale.forLanguageTag(locale.replace('_', '-')); 130 if (previous.locale.getLanguage().equals(l.getLanguage()) && 131 !previous.locale 254 updateLocale(Locale locale) argument [all...] |
/frameworks/minikin/libs/minikin/ |
H A D | HyphenatorMap.cpp | 49 const Locale locale(localeStr); 52 mMap[locale.getIdentifier()] = hyphenator; 73 const Hyphenator* HyphenatorMap::lookupInternal(const Locale& locale) { argument 74 const uint64_t id = locale.getIdentifier(); 82 result = lookupBySubtag(locale, LANGUAGE | REGION | SCRIPT | VARIANT); 87 result = lookupBySubtag(locale, LANGUAGE | REGION | VARIANT); 92 result = lookupBySubtag(locale, LANGUAGE | VARIANT); 97 result = lookupBySubtag(locale, LANGUAGE); 102 result = lookupBySubtag(locale, SCRIPT); 120 const Hyphenator* HyphenatorMap::lookupBySubtag(const Locale& locale, SubtagBit argument [all...] |
H A D | HyphenatorMap.h | 45 // The returned pointer is never a dangling pointer. If nothing found for a given locale, 49 // 1. Search for the Hyphenator with the given locale. 55 static const Hyphenator* lookup(const Locale& locale) { argument 56 return getInstance().lookupInternal(locale); 64 const Hyphenator* lookupInternal(const Locale& locale); 75 const Hyphenator* lookupBySubtag(const Locale& locale, SubtagBits bits) const
|
H A D | LocaleListCache.cpp | 34 static size_t toLanguageTag(char* output, size_t outSize, const StringPiece& locale) { argument 36 if (locale.empty()) { 40 std::string localeString = locale.toString(); // ICU only understands C-style string. 46 // unable to build a proper locale identifier 63 // unable to build a proper locale identifier 72 // unable to build a proper locale identifier 89 Locale locale(StringPiece(langTag, length)); 90 if (locale.isUnsupported()) { 93 const bool isNewLocale = seen.insert(locale.getIdentifier()).second; 98 result.push_back(locale); [all...] |
/frameworks/av/media/libmedia/ |
H A D | MediaScannerClient.cpp | 34 void MediaScannerClient::setLocale(const char* locale) argument 36 mLocale = locale; // not currently used
|
/frameworks/base/core/java/com/android/internal/textservice/ |
H A D | ITextServicesManager.aidl | 32 SpellCheckerInfo getCurrentSpellChecker(String locale); 34 String locale, boolean allowImplicitlySelectedSubtype); 35 oneway void getSpellCheckerService(String sciId, in String locale,
|
/frameworks/base/tools/aapt2/configuration/ |
H A D | ConfigurationParser_test.cpp | 55 << "\n locale: " << artifact.locale_group 109 <locale-groups> 110 <locale-group label="europe" version-code-order="1"> 111 <locale>en</locale> 112 <locale>es</locale> 113 <locale>fr</locale> 114 <locale>d [all...] |
/frameworks/base/core/jni/ |
H A D | android_text_Hyphenator.cpp | 29 static std::string buildFileName(const std::string& locale) { argument 33 lowerLocale.reserve(locale.size()); 34 std::transform(locale.begin(), locale.end(), std::back_inserter(lowerLocale), ::tolower); 38 static const uint8_t* mmapPatternFile(const std::string& locale) { argument 39 const std::string hyFilePath = buildFileName(locale); 59 static void addHyphenatorWithoutPatternFile(const std::string& locale, int minPrefix, argument 61 minikin::addHyphenator(locale, minikin::Hyphenator::loadBinary( 62 nullptr, minPrefix, minSuffix, locale)); 65 static void addHyphenator(const std::string& locale, in argument [all...] |
/frameworks/layoutlib/bridge/src/libcore/icu/ |
H A D | ICU_Delegate.java | 109 /*package*/ static String getCurrencyCode(String locale) { argument 114 /*package*/ static String getCurrencyDisplayName(String locale, String currencyCode) { argument 129 /*package*/ static String getCurrencySymbol(String locale, String currencyCode) { argument 134 /*package*/ static String getDisplayCountryNative(String countryCode, String locale) { argument 139 /*package*/ static String getDisplayLanguageNative(String languageCode, String locale) { argument 144 /*package*/ static String getDisplayVariantNative(String variantCode, String locale) { argument 149 /*package*/ static String getDisplayScriptNative(String variantCode, String locale) { argument 154 /*package*/ static String getISO3Country(String locale) { argument 159 /*package*/ static String getISO3Language(String locale) { argument 164 /*package*/ static String addLikelySubtags(String locale) { argument 169 getScript(String locale) argument 184 initLocaleDataNative(String locale, LocaleData result) argument 250 setDefaultLocale(String locale) argument [all...] |
/frameworks/base/core/java/android/provider/ |
H A D | UserDictionary.java | 30 * frequency information and locale information. 84 * The locale that this word belongs to. Null if it pertains to all 88 public static final String LOCALE = "locale"; 120 * specified locale type. 128 * @param localeType the locale type for this word. It should be one of 139 final Locale locale; 142 locale = Locale.getDefault(); 144 locale = null; 147 addWord(context, word, frequency, null, locale); 151 * locale typ 161 addWord(Context context, String word, int frequency, String shortcut, Locale locale) argument [all...] |
/frameworks/base/core/java/android/hardware/soundtrigger/ |
H A D | KeyphraseMetadata.java | 56 * @return Indicates if we support the given locale. 58 public boolean supportsLocale(Locale locale) { argument 59 return supportedLocales.isEmpty() || supportedLocales.contains(locale);
|
/frameworks/base/core/java/android/view/ |
H A D | AccessibilityIterators.java | 74 public static CharacterTextSegmentIterator getInstance(Locale locale) { argument 76 sInstance = new CharacterTextSegmentIterator(locale); 81 private CharacterTextSegmentIterator(Locale locale) { argument 82 mLocale = locale; 83 onLocaleChanged(locale); 147 final Locale locale = globalConfig.getLocales().get(0); 148 if (!mLocale.equals(locale)) { 149 mLocale = locale; 150 onLocaleChanged(locale); 154 protected void onLocaleChanged(Locale locale) { argument 162 getInstance(Locale locale) argument 169 WordTextSegmentIterator(Locale locale) argument 174 onLocaleChanged(Locale locale) argument [all...] |
/frameworks/support/compat/src/main/java/androidx/core/os/ |
H A D | ConfigurationCompat.java | 34 * @return The locale list. 40 return LocaleListCompat.create(configuration.locale);
|
H A D | LocaleHelper.java | 61 static String toLanguageTag(Locale locale) { argument 63 buf.append(locale.getLanguage()); 64 final String country = locale.getCountry(); 67 buf.append(locale.getCountry());
|
/frameworks/base/core/java/android/view/textservice/ |
H A D | TextServicesManager.java | 102 * Returns the language component of a given locale string. 104 private static String parseLanguageFromLocaleString(String locale) { argument 105 final int idx = locale.indexOf('_'); 107 return locale; 109 return locale.substring(0, idx); 115 * @param locale the locale for the spell checker. If {@code locale} is null and 116 * referToSpellCheckerLanguageSettings is true, the locale specified in Settings will be 117 * returned. If {@code locale} i 127 newSpellCheckerSession(Bundle bundle, Locale locale, SpellCheckerSessionListener listener, boolean referToSpellCheckerLanguageSettings) argument [all...] |
/frameworks/base/core/java/android/text/format/ |
H A D | DateFormat.java | 164 * formatted as 12 hour (AM/PM) times. Based on the user's chosen locale and other preferences. 174 * formatted as 12 hour (AM/PM) times. Based on the user's chosen locale and other preferences. 188 return is24HourLocale(context.getResources().getConfiguration().locale); 192 * Returns true if the specified locale uses a 24-hour time format by default, ignoring user 194 * @param locale the locale to check 195 * @return true if the locale uses a 24 hour time format by default, false otherwise 198 public static boolean is24HourLocale(@NonNull Locale locale) { argument 200 if (sIs24HourLocale != null && sIs24HourLocale.equals(locale)) { 206 java.text.DateFormat.getTimeInstance(java.text.DateFormat.LONG, locale); 252 getBestDateTimePattern(Locale locale, String skeleton) argument [all...] |
/frameworks/support/compat/src/main/java/androidx/core/text/ |
H A D | ICUCompat.java | 66 * If the locale isn't already in its maximal form, likely subtags for the provided locale 72 * If locale is already in the maximal form, or there is no data available for maximization, 87 public static String maximizeAndGetScript(Locale locale) { argument 90 final Object[] args = new Object[] { locale }; 97 return locale.getScript(); 99 final String localeWithSubtags = addLikelySubtags(locale); 124 private static String addLikelySubtags(Locale locale) { argument 125 final String localeStr = locale.toString();
|