/frameworks/base/tools/localedata/ |
D | extract_icu_data.py | 26 def get_locale_parts(locale): argument 28 parts = locale.split('_') 111 def pack_to_uint32(locale): argument 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), 138 locale.replace('_', '-'), 143 def pack_to_uint64(locale): argument 145 _, script, _ = get_locale_parts(locale) [all …]
|
/frameworks/base/tools/aapt2/configuration/ |
D | ConfigurationParser_test.cpp | 111 <locale-groups> 112 <locale-group label="europe" version-code-order="1"> 113 <locale>en</locale> 114 <locale>es</locale> 115 <locale>fr</locale> 116 <locale>de</locale> 117 </locale-group> 118 <locale-group label="north-america" version-code-order="2"> 119 <locale>en</locale> 120 <locale>es-rMX</locale> [all …]
|
/frameworks/base/core/java/com/android/internal/app/ |
D | LocaleHelper.java | 68 public static String toSentenceCase(String str, Locale locale) { in toSentenceCase() argument 73 return str.substring(0, firstCodePointLen).toUpperCase(locale) in toSentenceCase() 89 public static String normalizeForSearch(String str, Locale locale) { in normalizeForSearch() argument 99 private static boolean shouldUseDialectName(Locale locale) { in shouldUseDialectName() argument 100 final String lang = locale.getLanguage(); in shouldUseDialectName() 115 public static String getDisplayName(Locale locale, Locale displayLocale, boolean sentenceCase) { in getDisplayName() argument 117 String result = shouldUseDialectName(locale) in getDisplayName() 118 ? ULocale.getDisplayNameWithDialect(locale.toLanguageTag(), displayULocale) in getDisplayName() 119 : ULocale.getDisplayName(locale.toLanguageTag(), displayULocale); in getDisplayName() 130 public static String getDisplayName(Locale locale, boolean sentenceCase) { in getDisplayName() argument [all …]
|
D | LocalePicker.java | 60 public void onLocaleSelected(Locale locale); in onLocaleSelected() argument 69 final Locale locale; field in LocalePicker.LocaleInfo 71 public LocaleInfo(String label, Locale locale) { in LocaleInfo() argument 73 this.locale = locale; in LocaleInfo() 82 return locale; in getLocale() 109 for (String locale : allLocales) { in getSupportedLocales() 110 if (localeFilter.test(locale)) { in getSupportedLocales() 111 result.add(locale); in getSupportedLocales() 147 for (String locale : localeList) { in getAllAssetLocales() 148 final Locale l = Locale.forLanguageTag(locale.replace('_', '-')); in getAllAssetLocales() [all …]
|
D | LocaleStore.java | 55 private LocaleInfo(Locale locale) { in LocaleInfo() argument 56 this.mLocale = locale; in LocaleInfo() 57 this.mId = locale.toLanguageTag(); in LocaleInfo() 58 this.mParent = getParent(locale); in LocaleInfo() 69 private static Locale getParent(Locale locale) { in getParent() argument 70 if (locale.getCountry().isEmpty()) { in getParent() 74 .setLocale(locale) in getParent() 246 private static void addSuggestedLocalesForRegion(Locale locale) { in addSuggestedLocalesForRegion() argument 247 if (locale == null) { in addSuggestedLocalesForRegion() 250 final String country = locale.getCountry(); in addSuggestedLocalesForRegion() [all …]
|
D | SuggestedLocaleAdapter.java | 141 public void setDisplayLocale(@NonNull Context context, @Nullable Locale locale) { in setDisplayLocale() argument 142 if (locale == null) { in setDisplayLocale() 145 } else if (!locale.equals(mDisplayLocale)) { in setDisplayLocale() 146 mDisplayLocale = locale; in setDisplayLocale() 148 configOverride.setLocale(locale); in setDisplayLocale() 196 TextView text = (TextView) convertView.findViewById(R.id.locale); in getView() 253 Locale locale = Locale.getDefault(); in performFiltering() local 254 String prefixString = LocaleHelper.normalizeForSearch(prefix.toString(), locale); in performFiltering() 262 value.getFullNameInUiLanguage(), locale); in performFiltering() 264 value.getFullNameNative(), locale); in performFiltering()
|
/frameworks/base/core/jni/ |
D | android_text_Hyphenator.cpp | 30 static std::string buildFileName(const std::string& locale) { in buildFileName() argument 34 lowerLocale.reserve(locale.size()); in buildFileName() 35 std::transform(locale.begin(), locale.end(), std::back_inserter(lowerLocale), ::tolower); in buildFileName() 39 static const uint8_t* mmapPatternFile(const std::string& locale) { in mmapPatternFile() argument 40 const std::string hyFilePath = buildFileName(locale); in mmapPatternFile() 60 static void addHyphenatorWithoutPatternFile(const std::string& locale, int minPrefix, in addHyphenatorWithoutPatternFile() argument 62 minikin::addHyphenator(locale, minikin::Hyphenator::loadBinary( in addHyphenatorWithoutPatternFile() 63 nullptr, minPrefix, minSuffix, locale)); in addHyphenatorWithoutPatternFile() 66 static void addHyphenator(const std::string& locale, int minPrefix, int minSuffix) { in addHyphenator() argument 67 const uint8_t* ptr = mmapPatternFile(locale); in addHyphenator() [all …]
|
/frameworks/base/core/java/android/text/method/ |
D | TimeKeyListener.java | 67 public TimeKeyListener(@Nullable Locale locale) { in TimeKeyListener() argument 71 final boolean success = NumberKeyListener.addDigits(chars, locale) in TimeKeyListener() 72 && NumberKeyListener.addAmPmChars(chars, locale) in TimeKeyListener() 74 chars, locale, SKELETON_12HOUR, SYMBOLS_TO_IGNORE) in TimeKeyListener() 76 chars, locale, SKELETON_24HOUR, SYMBOLS_TO_IGNORE); in TimeKeyListener() 79 if (locale != null && "en".equals(locale.getLanguage())) { in TimeKeyListener() 106 public static TimeKeyListener getInstance(@Nullable Locale locale) { in getInstance() argument 109 instance = sInstanceCache.get(locale); in getInstance() 111 instance = new TimeKeyListener(locale); in getInstance() 112 sInstanceCache.put(locale, instance); in getInstance()
|
D | DateTimeKeyListener.java | 67 public DateTimeKeyListener(@Nullable Locale locale) { in DateTimeKeyListener() argument 71 final boolean success = NumberKeyListener.addDigits(chars, locale) in DateTimeKeyListener() 72 && NumberKeyListener.addAmPmChars(chars, locale) in DateTimeKeyListener() 74 chars, locale, SKELETON_12HOUR, SYMBOLS_TO_IGNORE) in DateTimeKeyListener() 76 chars, locale, SKELETON_24HOUR, SYMBOLS_TO_IGNORE); in DateTimeKeyListener() 79 if (locale != null && "en".equals(locale.getLanguage())) { in DateTimeKeyListener() 106 public static DateTimeKeyListener getInstance(@Nullable Locale locale) { in getInstance() argument 109 instance = sInstanceCache.get(locale); in getInstance() 111 instance = new DateTimeKeyListener(locale); in getInstance() 112 sInstanceCache.put(locale, instance); in getInstance()
|
D | DateKeyListener.java | 65 public DateKeyListener(@Nullable Locale locale) { in DateKeyListener() argument 69 final boolean success = NumberKeyListener.addDigits(chars, locale) in DateKeyListener() 71 chars, locale, SKELETONS, SYMBOLS_TO_IGNORE); in DateKeyListener() 94 public static DateKeyListener getInstance(@Nullable Locale locale) { in getInstance() argument 97 instance = sInstanceCache.get(locale); in getInstance() 99 instance = new DateKeyListener(locale); in getInstance() 100 sInstanceCache.put(locale, instance); in getInstance()
|
D | DigitsKeyListener.java | 116 public DigitsKeyListener(@Nullable Locale locale) { in DigitsKeyListener() argument 117 this(locale, false, false); in DigitsKeyListener() 155 public DigitsKeyListener(@Nullable Locale locale, boolean sign, boolean decimal) { in DigitsKeyListener() argument 159 mLocale = locale; in DigitsKeyListener() 160 if (locale == null) { in DigitsKeyListener() 165 final boolean success = NumberKeyListener.addDigits(chars, locale); in DigitsKeyListener() 171 final DecimalFormatSymbols symbols = DecimalFormatSymbols.getInstance(locale); in DigitsKeyListener() 249 public static DigitsKeyListener getInstance(@Nullable Locale locale) { in getInstance() argument 250 return getInstance(locale, false, false); in getInstance() 265 @Nullable Locale locale, boolean sign, boolean decimal) { in getInstance() [all …]
|
D | NumberKeyListener.java | 151 static boolean addDigits(@NonNull Collection<Character> collection, @Nullable Locale locale) { in addDigits() argument 152 if (locale == null) { in addDigits() 155 final String[] digits = DecimalFormatSymbols.getInstance(locale).getDigitStrings(); in addDigits() 172 @NonNull Collection<Character> collection, @Nullable Locale locale, in addFormatCharsFromSkeleton() argument 174 if (locale == null) { in addFormatCharsFromSkeleton() 177 final String pattern = DateFormat.getBestDateTimePattern(locale, skeleton); in addFormatCharsFromSkeleton() 210 @NonNull Collection<Character> collection, @Nullable Locale locale, in addFormatCharsFromSkeletons() argument 214 collection, locale, skeletons[i], symbolsToIgnore); in addFormatCharsFromSkeletons() 225 @Nullable Locale locale) { in addAmPmChars() argument 226 if (locale == null) { in addAmPmChars() [all …]
|
D | AllCapsTransformationMethod.java | 58 Locale locale = null; in getTransformation() local 60 locale = ((TextView)view).getTextLocale(); in getTransformation() 62 if (locale == null) { in getTransformation() 63 locale = mLocale; in getTransformation() 66 return TextUtils.toUpperCase(locale, source, copySpans); in getTransformation()
|
/frameworks/layoutlib/bridge/src/libcore/icu/ |
D | ICU_Delegate.java | 110 /*package*/ static String getCurrencyCode(String locale) { in getCurrencyCode() argument 115 /*package*/ static String getCurrencyDisplayName(String locale, String currencyCode) { in getCurrencyDisplayName() argument 130 /*package*/ static String getCurrencySymbol(String locale, String currencyCode) { in getCurrencySymbol() argument 135 /*package*/ static String getDisplayCountryNative(String countryCode, String locale) { in getDisplayCountryNative() argument 140 /*package*/ static String getDisplayLanguageNative(String languageCode, String locale) { in getDisplayLanguageNative() argument 145 /*package*/ static String getDisplayVariantNative(String variantCode, String locale) { in getDisplayVariantNative() argument 150 /*package*/ static String getDisplayScriptNative(String variantCode, String locale) { in getDisplayScriptNative() argument 155 /*package*/ static String getISO3Country(String locale) { in getISO3Country() argument 160 /*package*/ static String getISO3Language(String locale) { in getISO3Language() argument 165 /*package*/ static String addLikelySubtags(String locale) { in addLikelySubtags() argument [all …]
|
/frameworks/base/core/java/android/view/ |
D | AccessibilityIterators.java | 80 public static CharacterTextSegmentIterator getInstance(Locale locale) { in getInstance() argument 82 sInstance = new CharacterTextSegmentIterator(locale); in getInstance() 87 private CharacterTextSegmentIterator(Locale locale) { in CharacterTextSegmentIterator() argument 88 mLocale = locale; in CharacterTextSegmentIterator() 89 onLocaleChanged(locale); in CharacterTextSegmentIterator() 153 final Locale locale = globalConfig.getLocales().get(0); in onConfigurationChanged() local 154 if (locale == null) { in onConfigurationChanged() 157 if (!mLocale.equals(locale)) { in onConfigurationChanged() 158 mLocale = locale; in onConfigurationChanged() 159 onLocaleChanged(locale); in onConfigurationChanged() [all …]
|
/frameworks/minikin/libs/minikin/ |
D | HyphenatorMap.cpp | 49 const Locale locale(localeStr); in addInternal() local 52 mMap[locale.getIdentifier()] = hyphenator; in addInternal() 73 const Hyphenator* HyphenatorMap::lookupInternal(const Locale& locale) { in lookupInternal() argument 74 const uint64_t id = locale.getIdentifier(); in lookupInternal() 82 result = lookupBySubtag(locale, LANGUAGE | REGION | SCRIPT | VARIANT); in lookupInternal() 87 result = lookupBySubtag(locale, LANGUAGE | REGION | VARIANT); in lookupInternal() 92 result = lookupBySubtag(locale, LANGUAGE | VARIANT); in lookupInternal() 97 result = lookupBySubtag(locale, LANGUAGE); in lookupInternal() 102 result = lookupBySubtag(locale, SCRIPT); in lookupInternal() 120 const Hyphenator* HyphenatorMap::lookupBySubtag(const Locale& locale, SubtagBits bits) const { in lookupBySubtag() argument [all …]
|
D | LocaleListCache.cpp | 34 static size_t toLanguageTag(char* output, size_t outSize, const StringPiece& locale) { in toLanguageTag() argument 36 if (locale.empty()) { in toLanguageTag() 40 std::string localeString = locale.toString(); // ICU only understands C-style string. in toLanguageTag() 92 Locale locale(StringPiece(langTag, length)); in parseLocaleList() local 93 if (locale.isUnsupported()) { in parseLocaleList() 96 const bool isNewLocale = seen.insert(locale.getIdentifier()).second; in parseLocaleList() 101 result.push_back(locale); in parseLocaleList()
|
/frameworks/base/core/java/android/text/format/ |
D | DateFormat.java | 188 return is24HourLocale(context.getResources().getConfiguration().locale); in is24HourFormat() 198 public static boolean is24HourLocale(@NonNull Locale locale) { in is24HourLocale() argument 200 if (sIs24HourLocale != null && sIs24HourLocale.equals(locale)) { in is24HourLocale() 206 java.text.DateFormat.getTimeInstance(java.text.DateFormat.LONG, locale); in is24HourLocale() 218 sIs24HourLocale = locale; in is24HourLocale() 252 public static String getBestDateTimePattern(Locale locale, String skeleton) { in getBestDateTimePattern() argument 253 DateTimePatternGenerator dtpg = DateTimePatternGenerator.getInstance(locale); in getBestDateTimePattern() 264 final Locale locale = context.getResources().getConfiguration().locale; in getTimeFormat() local 265 return new java.text.SimpleDateFormat(getTimeFormatString(context), locale); in getTimeFormat() 289 context.getResources().getConfiguration().locale); in getTimeFormatString() [all …]
|
/frameworks/base/core/java/android/view/textservice/ |
D | TextServicesManager.java | 128 private static String parseLanguageFromLocaleString(String locale) { in parseLanguageFromLocaleString() argument 129 final int idx = locale.indexOf('_'); in parseLanguageFromLocaleString() 131 return locale; in parseLanguageFromLocaleString() 133 return locale.substring(0, idx); in parseLanguageFromLocaleString() 151 public SpellCheckerSession newSpellCheckerSession(Bundle bundle, Locale locale, in newSpellCheckerSession() argument 156 if (!referToSpellCheckerLanguageSettings && locale == null) { in newSpellCheckerSession() 180 if (locale != null) { in newSpellCheckerSession() 183 if (subtypeLanguage.length() < 2 || !locale.getLanguage().equals(subtypeLanguage)) { in newSpellCheckerSession() 188 final String localeStr = locale.toString(); in newSpellCheckerSession() 197 locale.getLanguage().equals(tempSubtypeLanguage)) { in newSpellCheckerSession()
|
D | SpellCheckerSubtype.java | 82 public SpellCheckerSubtype(int nameId, String locale, String languageTag, String extraValue, in SpellCheckerSubtype() argument 85 mSubtypeLocale = locale != null ? locale : ""; in SpellCheckerSubtype() 104 public SpellCheckerSubtype(int nameId, String locale, String extraValue) { in SpellCheckerSubtype() argument 105 this(nameId, locale, SUBTYPE_LANGUAGE_TAG_NONE, extraValue, SUBTYPE_ID_NONE); in SpellCheckerSubtype() 246 final Locale locale = getLocaleObject(); in getDisplayName() local 247 final String localeStr = locale != null ? locale.getDisplayName() : mSubtypeLocale; in getDisplayName() 287 private static int hashCodeInternal(String locale, String extraValue) { in hashCodeInternal() argument 288 return Arrays.hashCode(new Object[] {locale, extraValue}); in hashCodeInternal()
|
/frameworks/base/core/java/android/provider/ |
D | UserDictionary.java | 139 final Locale locale; in addWord() local 142 locale = Locale.getDefault(); in addWord() 144 locale = null; in addWord() 147 addWord(context, word, frequency, null, locale); in addWord() 162 int frequency, String shortcut, Locale locale) { in addWord() argument 177 values.put(LOCALE, null == locale ? null : locale.toString()); in addWord()
|
/frameworks/base/core/java/android/os/ |
D | LocaleList.java | 85 public int indexOf(Locale locale) { in indexOf() argument 87 if (mList[i].equals(locale)) { in indexOf() 279 private static String getLikelyScript(Locale locale) { in getLikelyScript() argument 280 final String script = locale.getScript(); in getLikelyScript() 285 return ULocale.addLikelySubtags(ULocale.forLocale(locale)).getScript(); in getLikelyScript() 295 private static boolean isPseudoLocale(String locale) { in isPseudoLocale() argument 296 return STRING_EN_XA.equals(locale) || STRING_AR_XB.equals(locale); in isPseudoLocale() 303 public static boolean isPseudoLocale(Locale locale) { in isPseudoLocale() argument 304 return LOCALE_EN_XA.equals(locale) || LOCALE_AR_XB.equals(locale); in isPseudoLocale() 310 public static boolean isPseudoLocale(@Nullable ULocale locale) { in isPseudoLocale() argument [all …]
|
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/ |
D | SettingsHelper.java | 306 private static Locale toFullLocale(@NonNull Locale locale) { in toFullLocale() argument 307 if (locale.getScript().isEmpty() || locale.getCountry().isEmpty()) { in toFullLocale() 308 return ULocale.addLikelySubtags(ULocale.forLocale(locale)).toLocale(); in toFullLocale() 310 return locale; in toFullLocale() 342 final Locale locale = Locale.forLanguageTag(supportedLocaleStr); in resolveLocales() local 343 allLocales.put(toFullLocale(locale), locale); in resolveLocales() local 348 final Locale locale = current.get(i); in resolveLocales() local 349 allLocales.remove(toFullLocale(locale)); in resolveLocales() 350 filtered.add(locale); in resolveLocales() 354 final Locale locale = allLocales.remove(toFullLocale(restore.get(i))); in resolveLocales() local [all …]
|
/frameworks/base/core/java/android/speech/tts/ |
D | TextToSpeechService.java | 252 private int getExpectedLanguageAvailableStatus(Locale locale) { in getExpectedLanguageAvailableStatus() argument 254 if (locale.getVariant().isEmpty()) { in getExpectedLanguageAvailableStatus() 255 if (locale.getCountry().isEmpty()) { in getExpectedLanguageAvailableStatus() 281 for (Locale locale : Locale.getAvailableLocales()) { in onGetVoices() 282 int expectedStatus = getExpectedLanguageAvailableStatus(locale); in onGetVoices() 284 int localeStatus = onIsLanguageAvailable(locale.getISO3Language(), in onGetVoices() 285 locale.getISO3Country(), locale.getVariant()); in onGetVoices() 293 Set<String> features = onGetFeaturesForLanguage(locale.getISO3Language(), in onGetVoices() 294 locale.getISO3Country(), locale.getVariant()); in onGetVoices() 295 String voiceName = onGetDefaultVoiceNameFor(locale.getISO3Language(), in onGetVoices() [all …]
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/datetime/ |
D | ZoneGetter.java | 98 Locale locale = context.getResources().getConfiguration().locale; in getTimeZoneOffsetAndName() local 99 TimeZoneFormat tzFormatter = TimeZoneFormat.getInstance(locale); in getTimeZoneOffsetAndName() 100 CharSequence gmtText = getGmtOffsetText(tzFormatter, locale, tz, now); in getTimeZoneOffsetAndName() 101 TimeZoneNames timeZoneNames = TimeZoneNames.getInstance(locale); in getTimeZoneOffsetAndName() 112 final Locale locale = context.getResources().getConfiguration().locale; in getZonesList() local 114 final TimeZoneNames timeZoneNames = TimeZoneNames.getInstance(locale); in getZonesList() 286 public static CharSequence getGmtOffsetText(TimeZoneFormat tzFormatter, Locale locale, in getGmtOffsetText() argument 361 boolean isRtl = TextUtils.getLayoutDirectionFromLocale(locale) == View.LAYOUT_DIRECTION_RTL; in getGmtOffsetText() 376 final Locale locale = context.getResources().getConfiguration().locale; 377 final TimeZoneFormat tzFormatter = TimeZoneFormat.getInstance(locale); [all …]
|