/packages/providers/ContactsProvider/src/com/android/providers/contacts/ |
D | LocaleSet.java | 52 static boolean isLanguageChinese(@Nullable Locale locale) { in isLanguageChinese() argument 53 return locale != null && "zh".equals(locale.getLanguage()); in isLanguageChinese() 57 static boolean isLanguageJapanese(@Nullable Locale locale) { in isLanguageJapanese() argument 58 return locale != null && "ja".equals(locale.getLanguage()); in isLanguageJapanese() 62 static boolean isLanguageKorean(@Nullable Locale locale) { in isLanguageKorean() argument 63 return locale != null && "ko".equals(locale.getLanguage()); in isLanguageKorean() 67 static boolean isLocaleCJK(@Nullable Locale locale) { in isLocaleCJK() argument 68 return isLanguageChinese(locale) || in isLocaleCJK() 69 isLanguageJapanese(locale) || in isLocaleCJK() 70 isLanguageKorean(locale); in isLocaleCJK() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/ |
D | DictionaryInfoUtils.java | 83 public DictionaryInfo(@Nonnull String id, @Nonnull Locale locale, in DictionaryInfo() argument 87 mLocale = locale; in DictionaryInfo() 243 public static String getCacheDirectoryForLocale(final String locale, final Context context) { 244 final String relativeDirectoryName = replaceFileNameDangerousCharacters(locale); 250 Log.e(TAG, "Could not create the directory for locale" + locale); 271 public static String getCacheFileName(String id, String locale, Context context) { 273 return getCacheDirectoryForLocale(locale, context) + File.separator + fileName; 276 public static String getStagingFileName(String id, String locale, Context context) { 287 locale + TEMP_DICT_FILE_SUB + id); 310 final String locale = localeAndFileId[0]; [all …]
|
/packages/apps/Settings/src/com/android/settings/inputmethod/ |
D | UserDictionaryListPreferenceController.java | 56 public void setLocale(String locale) { in setLocale() argument 57 mLocale = locale; in setLocale() 93 final String locale = cursor.getString(columnIndex); in getUserDictionaryLocalesSet() local 94 localeSet.add(null != locale ? locale : ""); in getUserDictionaryLocalesSet() 116 final String locale = subtype.getLocale(); in getUserDictionaryLocalesSet() local 117 if (!TextUtils.isEmpty(locale)) { in getUserDictionaryLocalesSet() 118 localeSet.add(locale); in getUserDictionaryLocalesSet() 176 for (String locale : localeSet) { in createUserDictSettings() 177 final Preference pref = createUserDictionaryPreference(locale); in createUserDictSettings() 191 private Preference createUserDictionaryPreference(String locale) { in createUserDictionaryPreference() argument [all …]
|
/packages/apps/Settings/src/com/android/settings/localepicker/ |
D | NotificationController.java | 75 public void incrementDismissCount(@NonNull String locale) { in incrementDismissCount() argument 76 NotificationInfo currentInfo = mDataManager.getNotificationInfo(locale); in incrementDismissCount() 82 mDataManager.putNotificationInfo(locale, newInfo); in incrementDismissCount() 92 public boolean shouldTriggerNotification(int uid, @NonNull String locale) { in shouldTriggerNotification() argument 93 if (LocaleUtils.isInSystemLocale(locale)) { in shouldTriggerNotification() 98 return updateLocaleNotificationInfo(uid, locale); in shouldTriggerNotification() 108 public int getNotificationId(@NonNull String locale) { in getNotificationId() argument 109 NotificationInfo info = mDataManager.getNotificationInfo(locale); in getNotificationId() 118 public void removeNotificationInfo(@NonNull String locale) { in removeNotificationInfo() argument 119 mDataManager.removeNotificationInfo(locale); in removeNotificationInfo() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/localepicker/ |
D | NotificationControllerTest.java | 109 String locale = "en-US"; in testShouldTriggerNotification_noNotification_returnFalse() local 111 boolean triggered = mNotificationController.shouldTriggerNotification(uid, locale); in testShouldTriggerNotification_noNotification_returnFalse() 120 String locale = "en-US"; in testShouldTriggerNotification_return1stTrue() local 123 initSharedPreference(locale, uidSet, 0, 1, lastNotificationTime, notificationId); in testShouldTriggerNotification_return1stTrue() 127 boolean triggered = mNotificationController.shouldTriggerNotification(uid, locale); in testShouldTriggerNotification_return1stTrue() 136 String locale = "en-US"; in testShouldTriggerNotification_returnFalse_dueToOddCount() local 139 initSharedPreference(locale, uidSet, 0, 1, lastNotificationTime, id); in testShouldTriggerNotification_returnFalse_dueToOddCount() 144 boolean triggered = mNotificationController.shouldTriggerNotification(uid, locale); in testShouldTriggerNotification_returnFalse_dueToOddCount() 153 String locale = "en-US"; in testShouldTriggerNotification_returnFalse_dueToFrequency() local 156 initSharedPreference(locale, uidSet, 0, 1, lastNotificationTime, id); in testShouldTriggerNotification_returnFalse_dueToFrequency() [all …]
|
D | LocaleNotificationDataManagerTest.java | 55 String locale = "en-US"; in testPutGetNotificationInfo() local 59 mDataManager.putNotificationInfo(locale, info); in testPutGetNotificationInfo() 60 NotificationInfo expected = mDataManager.getNotificationInfo(locale); in testPutGetNotificationInfo() 73 String locale = "en-US"; in testRemoveNotificationInfo() local 77 mDataManager.putNotificationInfo(locale, info); in testRemoveNotificationInfo() 78 assertThat(mDataManager.getNotificationInfo(locale)).isEqualTo(info); in testRemoveNotificationInfo() 79 mDataManager.removeNotificationInfo(locale); in testRemoveNotificationInfo() 80 assertThat(mDataManager.getNotificationInfo(locale)).isNull(); in testRemoveNotificationInfo()
|
/packages/apps/Contacts/src/com/android/contacts/datepicker/ |
D | TwoDigitFormatter.java | 26 final Locale locale = Locale.getDefault(); in TwoDigitFormatter() local 27 init(locale); in TwoDigitFormatter() 30 private void init(Locale locale) { in init() argument 31 mFmt = createFormatter(locale); in init() 32 mZeroDigit = getZeroDigit(locale); in init() 46 private static char getZeroDigit(Locale locale) { in getZeroDigit() argument 49 return DecimalFormatSymbols.getInstance(locale).getZeroDigit(); in getZeroDigit() 52 private java.util.Formatter createFormatter(Locale locale) { in createFormatter() argument 53 return new java.util.Formatter(mBuilder, locale); in createFormatter()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/spellcheck/ |
D | AndroidSpellCheckerService.java | 107 private static String getKeyboardLayoutNameForLocale(final Locale locale) { in getKeyboardLayoutNameForLocale() argument 109 if (locale.getLanguage().equals("sr")) { in getKeyboardLayoutNameForLocale() 112 final int script = ScriptUtils.getScriptFromSpellCheckerLocale(locale); in getKeyboardLayoutNameForLocale() 160 public boolean isValidWord(final Locale locale, final String word) { in isValidWord() argument 164 mDictionaryFacilitatorCache.get(locale); in isValidWord() 171 public SuggestionResults getSuggestionResults(final Locale locale, in getSuggestionResults() argument 179 mDictionaryFacilitatorCache.get(locale); in getSuggestionResults() 191 public boolean hasMainDictionaryForLocale(final Locale locale) { in hasMainDictionaryForLocale() argument 195 mDictionaryFacilitatorCache.get(locale); in hasMainDictionaryForLocale() 214 public Keyboard getKeyboardForLocale(final Locale locale) { in getKeyboardForLocale() argument [all …]
|
/packages/inputmethods/LatinIME/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/ |
D | LocaleUtils.java | 91 final Locale locale = builder.build(); in constructLocaleFromString() local 92 sLocaleCache.put(localeStr, locale); in constructLocaleFromString() 93 return locale; in constructLocaleFromString() 151 public static String getLocaleCode(final Locale locale) { in getLocaleCode() argument 152 if (locale == DEFAULT_LOCALE) { in getLocaleCode() 155 return locale.toString(); in getLocaleCode() 158 public static String getLocaleDisplayName(final Locale locale) { in getLocaleDisplayName() argument 159 if (locale == DEFAULT_LOCALE) { in getLocaleDisplayName() 162 if (locale.getLanguage().equals(NO_LANGUAGE_LOCALE_CODE)) { in getLocaleDisplayName() 165 return locale.getDisplayName(Locale.ENGLISH); in getLocaleDisplayName()
|
D | MoreKeysResources.java | 76 for (final String locale : mResourcesMap.keySet()) { in MoreKeysResources() 77 final StringResourceMap resMap = mResourcesMap.get(locale); in MoreKeysResources() 81 throw new RuntimeException(res.mName + " in " + locale in MoreKeysResources() 169 private static String getArrayNameForLocale(final Locale locale) { in getArrayNameForLocale() argument 170 return TEXTS_ARRAY_NAME_PREFIX + LocaleUtils.getLocaleCode(locale); in getArrayNameForLocale() 175 final Locale locale = resMap.mLocale; in dumpTexts() local 178 locale, LocaleUtils.getLocaleDisplayName(locale)); in dumpTexts() 179 out.format(" private static final String[] " + getArrayNameForLocale(locale) in dumpTexts() 189 final Locale locale = resMap.mLocale; in dumpLocalesMap() local 190 final String localeStr = LocaleUtils.getLocaleCode(locale); in dumpLocalesMap() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/ |
D | DictionaryFactory.java | 47 final Locale locale) { in createMainDictionaryFromManager() argument 48 if (null == locale) { in createMainDictionaryFromManager() 50 return new DictionaryCollection(Dictionary.TYPE_MAIN, locale, in createMainDictionaryFromManager() 51 createReadOnlyBinaryDictionary(context, locale)); in createMainDictionaryFromManager() 56 BinaryDictionaryGetter.getDictionaryFiles(locale, context, true); in createMainDictionaryFromManager() 61 false /* useFullEditDistance */, locale, Dictionary.TYPE_MAIN); in createMainDictionaryFromManager() 75 return new DictionaryCollection(Dictionary.TYPE_MAIN, locale, dictList); in createMainDictionaryFromManager() 128 final Locale locale) { in createReadOnlyBinaryDictionary() argument 132 context.getResources(), locale); in createReadOnlyBinaryDictionary() 147 false /* useFullEditDistance */, locale, Dictionary.TYPE_MAIN); in createReadOnlyBinaryDictionary()
|
D | DicTraverseSession.java | 49 private static native long setDicTraverseSessionNative(String locale, long dictSize); in setDicTraverseSessionNative() argument 56 public DicTraverseSession(Locale locale, long dictionary, long dictSize) { in DicTraverseSession() argument 58 locale != null ? locale.toString() : "", dictSize); in DicTraverseSession() 75 private static long createNativeDicTraverseSession(String locale, long dictSize) { in createNativeDicTraverseSession() argument 76 return setDicTraverseSessionNative(locale, dictSize); in createNativeDicTraverseSession()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/personalization/ |
D | UserHistoryDictionary.java | 47 UserHistoryDictionary(final Context context, final Locale locale, in UserHistoryDictionary() argument 49 …super(context, getUserHistoryDictName(NAME, locale, null /* dictFile */, account), locale, Diction… in UserHistoryDictionary() 59 static String getUserHistoryDictName(final String name, final Locale locale, in getUserHistoryDictName() argument 62 return getDictName(name, locale, dictFile); in getUserHistoryDictName() 64 return getUserHistoryDictNamePerAccount(name, locale, dictFile, account); in getUserHistoryDictName() 70 private static String getUserHistoryDictNamePerAccount(final String name, final Locale locale, in getUserHistoryDictNamePerAccount() argument 75 String dictName = name + "." + locale.toString(); in getUserHistoryDictNamePerAccount() 85 public static UserHistoryDictionary getDictionary(final Context context, final Locale locale, in getDictionary() argument 87 return PersonalizationHelper.getUserHistoryDictionary(context, locale, account); in getDictionary()
|
/packages/apps/Settings/src/com/android/settings/utils/ |
D | FileSizeFormatter.java | 60 return context.getResources().getConfiguration().locale; in localeFromContext() 64 final Locale locale = localeFromContext(context); in bidiWrap() local 65 if (TextUtils.getLayoutDirectionFromLocale(locale) == View.LAYOUT_DIRECTION_RTL) { in bidiWrap() 72 private static NumberFormat getNumberFormatter(Locale locale, int fractionDigits) { in getNumberFormatter() argument 73 final NumberFormat numberFormatter = NumberFormat.getInstance(locale); in getNumberFormatter() 85 private static String formatMeasureShort(Locale locale, NumberFormat numberFormatter, in formatMeasureShort() argument 88 locale, MeasureFormat.FormatWidth.SHORT, numberFormatter); in formatMeasureShort() 94 final Locale locale = localeFromContext(context); in formatRoundedBytesResult() local 95 final NumberFormat numberFormatter = getNumberFormatter(locale, input.fractionDigits); in formatRoundedBytesResult() 96 return formatMeasureShort(locale, numberFormatter, input.value, input.units); in formatRoundedBytesResult()
|
/packages/apps/Car/Settings/src/com/android/car/settings/storage/ |
D | FileSizeFormatter.java | 59 return context.getResources().getConfiguration().locale; in localeFromContext() 63 Locale locale = localeFromContext(context); in bidiWrap() local 64 if (TextUtils.getLayoutDirectionFromLocale(locale) == View.LAYOUT_DIRECTION_RTL) { in bidiWrap() 71 private static NumberFormat getNumberFormatter(Locale locale, int fractionDigits) { in getNumberFormatter() argument 72 NumberFormat numberFormatter = NumberFormat.getInstance(locale); in getNumberFormatter() 84 private static String formatMeasureShort(Locale locale, NumberFormat numberFormatter, in formatMeasureShort() argument 86 MeasureFormat measureFormatter = MeasureFormat.getInstance(locale, in formatMeasureShort() 93 Locale locale = localeFromContext(context); in formatRoundedBytesResult() local 94 NumberFormat numberFormatter = getNumberFormatter(locale, input.fractionDigits); in formatRoundedBytesResult() 95 return formatMeasureShort(locale, numberFormatter, input.value, input.units); in formatRoundedBytesResult()
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/layout/ |
D | additional_proximity_chars.h | 43 AK_FORCE_INLINE static bool isEnLocale(const std::vector<int> *locale) { in isEnLocale() argument 45 if (locale->size() < NCHARS) { in isEnLocale() 49 if ((*locale)[i] != LOCALE_EN_US[i]) { in isEnLocale() 57 static int getAdditionalCharsSize(const std::vector<int> *locale, const int c) { in getAdditionalCharsSize() argument 58 if (!isEnLocale(locale)) { in getAdditionalCharsSize() 77 static const int *getAdditionalChars(const std::vector<int> *locale, const int c) { in getAdditionalChars() argument 78 if (!isEnLocale(locale)) { in getAdditionalChars()
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/ |
D | LocaleTestUtils.java | 83 public void setLocale(Locale locale) { in setLocale() argument 88 mSavedContextLocale = setResourcesLocale(mContext.getResources(), locale); in setLocale() 89 mSavedSystemLocale = setResourcesLocale(Resources.getSystem(), locale); in setLocale() 114 private Locale setResourcesLocale(Resources resources, Locale locale) { in setResourcesLocale() argument 116 Locale savedLocale = contextConfiguration.locale; in setResourcesLocale() 117 contextConfiguration.locale = locale; in setResourcesLocale()
|
/packages/inputmethods/LatinIME/common/src/com/android/inputmethod/latin/common/ |
D | LocaleUtils.java | 178 final Locale locale; in constructLocaleFromString() local 180 locale = new Locale(elements[0] /* language */); in constructLocaleFromString() 182 locale = new Locale(elements[0] /* language */, elements[1] /* country */); in constructLocaleFromString() 184 locale = new Locale(elements[0] /* language */, elements[1] /* country */, in constructLocaleFromString() 187 sLocaleCache.put(localeString, locale); in constructLocaleFromString() 188 return locale; in constructLocaleFromString() 207 public static boolean isRtlLanguage(@Nonnull final Locale locale) { in isRtlLanguage() argument 208 return sRtlLanguageCodes.contains(locale.getLanguage()); in isRtlLanguage()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/keyboard/internal/ |
D | KeyboardTextsSetTests.java | 75 final Locale locale = SubtypeLocaleUtils.getSubtypeLocale(subtype); in testSwitchToAlphaKeyLabel() local 76 textsSet.setLocale(locale, context); in testSwitchToAlphaKeyLabel() 79 assertNotNull("Switch to alpha key label of " + locale, switchToAlphaKeyLabel); in testSwitchToAlphaKeyLabel() 80 assertFalse("Switch to alpha key label of " + locale, switchToAlphaKeyLabel.isEmpty()); in testSwitchToAlphaKeyLabel() 102 final Locale locale = SubtypeLocaleUtils.getSubtypeLocale(subtype); in testTextFromResources() local 103 textsSet.setLocale(locale, context); in testTextFromResources() 106 assertNotNull(name + " of " + locale, text); in testTextFromResources() 107 assertFalse(name + " of " + locale, text.isEmpty()); in testTextFromResources()
|
/packages/apps/Messaging/src/com/android/messaging/util/ |
D | Dates.java | 112 context.getResources().getConfiguration().locale, false /*abbreviated*/, in getMessageDetailsTimeString() 126 context.getResources().getConfiguration().locale, flags, minPeriodToday); in getTimeString() 131 final boolean abbreviated, final Locale locale, final int flags, in getTimestamp() argument 142 return getThisWeekTimestamp(time, locale, abbreviated, flags); in getTimestamp() 144 return getThisYearTimestamp(time, locale, abbreviated, flags); in getTimestamp() 146 return getOlderThanAYearTimestamp(time, locale, abbreviated, flags); in getTimestamp() 181 final Locale locale, final boolean abbreviated, final int flags) { in getThisWeekTimestamp() argument 187 if (locale.equals(Locale.US)) { in getThisWeekTimestamp() 198 private static CharSequence getThisYearTimestamp(final long time, final Locale locale, in getThisYearTimestamp() argument 206 if (locale.equals(Locale.US)) { in getThisYearTimestamp() [all …]
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/keyboard/layout/expected/ |
D | ExpectedKey.java | 147 public ExpectedKey toUpperCase(Locale locale) { in toUpperCase() argument 148 return newInstance(mVisual.toUpperCase(locale), mOutput.toUpperCase(locale)); in toUpperCase() 222 public ExpectedAdditionalMoreKey toUpperCase(final Locale locale) { in toUpperCase() argument 223 final ExpectedKey upperCaseKey = super.toUpperCase(locale); in toUpperCase() 242 public ExpectedKey toUpperCase(final Locale locale) { in toUpperCase() argument 245 upperCaseMoreKeys[i] = mMoreKeys[i].toUpperCase(locale); in toUpperCase() 247 return newInstance(getVisual().toUpperCase(locale), getOutput().toUpperCase(locale), in toUpperCase() 347 public ExpectedKey toUpperCase(final Locale locale) { in toUpperCase() argument 351 upperCaseMoreKeys[i] = moreKeys[i].toUpperCase(locale); in toUpperCase() 356 upperCaseAdditionalMoreKeys[i] = mAdditionalMoreKeys[i].toUpperCase(locale); in toUpperCase() [all …]
|
/packages/apps/Settings/src/com/android/settings/regionalpreferences/ |
D | NumberingSystemItemController.java | 123 Locale locale = localeList.get(i); in initLanguageOptionsUi() local 124 LocaleStore.LocaleInfo localeInfo = LocaleStore.getLocaleInfo(locale); in initLanguageOptionsUi() 129 pref.setTitle(LocaleHelper.getDisplayName(locale.stripExtensions(), locale, true)); in initLanguageOptionsUi() local 130 pref.setKey(locale.toLanguageTag()); in initLanguageOptionsUi() 131 pref.setSummary(getNumberingSystem(locale)); in initLanguageOptionsUi() 200 Locale locale = localeList.get(i); in saveNumberingSystemToLocale() local 201 if (targetLocale.equals(locale)) { in saveNumberingSystemToLocale() 206 .setLocale(locale) in saveNumberingSystemToLocale() 218 private static String getNumberingSystem(Locale locale) { in getNumberingSystem() argument 221 NumberingSystem.getInstance(locale).getName()) in getNumberingSystem() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/compat/ |
D | UserDictionaryCompatUtils.java | 29 final int freq, final String shortcut, final Locale locale) { in addWord() argument 31 addWordWithShortcut(context, word, freq, shortcut, locale); in addWord() 35 final Locale currentLocale = context.getResources().getConfiguration().locale; in addWord() 36 final int localeType = currentLocale.equals(locale) in addWord() 45 final int freq, final String shortcut, final Locale locale) { in addWordWithShortcut() argument 46 UserDictionary.Words.addWord(context, word, freq, shortcut, locale); in addWordWithShortcut()
|
/packages/inputmethods/LatinIME/tools/make-keyboard-text/res/src/com/android/inputmethod/keyboard/internal/ |
D | KeyboardTextsTable.tmpl | 32 * tools/make-keyboard-text/res/values-<locale>/donottranslate-more-keys.xml 49 // Texts table to locale maps. 55 throw new RuntimeException("Unknown text name=" + name + " locale=" 69 + " locale=" + sTextsTableToLocaleMap.get(textsTable)); 72 public static String[] getTextsTable(final Locale locale) { 73 final String localeKey = locale.toString(); 77 final String languageKey = locale.getLanguage(); 98 // "locale", TEXT_ARRAY, /* numberOfNonNullText/lengthOf_TEXT_ARRAY localeName */ 108 final String locale = (String)LOCALES_AND_TEXTS[i]; 110 sLocaleToTextsTableMap.put(locale, textsTable); [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/userdictionary/ |
D | UserDictionaryList.java | 70 final String locale = cursor.getString(columnIndex); in getUserDictionaryLocalesSet() local 71 localeSet.add(null != locale ? locale : ""); in getUserDictionaryLocalesSet() 91 final String locale = subtype.getLocale(); in getUserDictionaryLocalesSet() local 92 if (!TextUtils.isEmpty(locale)) { in getUserDictionaryLocalesSet() 93 localeSet.add(locale); in getUserDictionaryLocalesSet() 128 for (String locale : localeSet) { in createUserDictSettings() 129 userDictGroup.addPreference(createUserDictionaryPreference(locale)); in createUserDictSettings()
|