Home | History | Annotate | Download | only in utils

Lines Matching refs:Subtype

19 import static com.android.inputmethod.latin.common.Constants.Subtype.ExtraValue.COMBINING_RULES;
20 import static com.android.inputmethod.latin.common.Constants.Subtype.ExtraValue.KEYBOARD_LAYOUT_SET;
21 import static com.android.inputmethod.latin.common.Constants.Subtype.ExtraValue.UNTRANSLATABLE_STRING_IN_SUBTYPE_NAME;
40 * A helper class to deal with subtype locales.
60 // Keyboard layout to subtype name resource id map.
65 // Exceptional locale to subtype name resource id map.
67 // Exceptional locale to subtype name with layout resource id map.
81 // This is for compatibility to keep the same subtype ids as pre-JellyBean.
112 // Register subtype name resource id of "No language" with key "zz_<layout>"
211 // No language subtype should be displayed in system locale.
259 private static String getReplacementString(@Nonnull final InputMethodSubtype subtype,
262 && subtype.containsExtraValueKey(UNTRANSLATABLE_STRING_IN_SUBTYPE_NAME)) {
263 return subtype.getExtraValueOf(UNTRANSLATABLE_STRING_IN_SUBTYPE_NAME);
265 return getSubtypeLocaleDisplayNameInternal(subtype.getLocale(), displayLocale);
270 @Nonnull final InputMethodSubtype subtype) {
272 return getSubtypeDisplayNameInternal(subtype, displayLocale);
276 public static String getSubtypeNameForLogging(@Nullable final InputMethodSubtype subtype) {
277 if (subtype == null) {
278 return "<null subtype>";
280 return getSubtypeLocale(subtype) + "/" + getKeyboardLayoutSetName(subtype);
284 private static String getSubtypeDisplayNameInternal(@Nonnull final InputMethodSubtype subtype,
286 final String replacementString = getReplacementString(subtype, displayLocale);
288 final int nameResId = subtype.getNameResId();
297 Log.w(TAG, "Unknown subtype: mode=" + subtype.getMode()
298 + " nameResId=" + subtype.getNameResId()
299 + " locale=" + subtype.getLocale()
300 + " extra=" + subtype.getExtraValue()
311 public static Locale getSubtypeLocale(@Nonnull final InputMethodSubtype subtype) {
312 final String localeString = subtype.getLocale();
318 @Nonnull final InputMethodSubtype subtype) {
319 final String layoutName = getKeyboardLayoutSetName(subtype);
329 public static String getKeyboardLayoutSetName(final InputMethodSubtype subtype) {
330 String keyboardLayoutSet = subtype.getExtraValueOf(KEYBOARD_LAYOUT_SET);
332 // This subtype doesn't have a keyboardLayoutSet extra value, so lookup its keyboard
335 final String key = subtype.getLocale() + ":" + subtype.getExtraValue();
342 subtype.getLocale() + " extraValue=" + subtype.getExtraValue());
348 public static String getCombiningRulesExtraValue(final InputMethodSubtype subtype) {
349 return subtype.getExtraValueOf(COMBINING_RULES);