public static String getCombiningRulesExtraValue(final InputMethodSubtype subtype) { return subtype.getExtraValueOf(Constants.Subtype.ExtraValue.COMBINING_RULES); } }
public String getExtraValueOf(@NonNull final String key) { return mSubtype.getExtraValueOf(key); }
@NonNull private static String getReplacementString(@NonNull final InputMethodSubtype subtype, @NonNull final Locale displayLocale) { if (subtype.containsExtraValueKey(UNTRANSLATABLE_STRING_IN_SUBTYPE_NAME)) { return subtype.getExtraValueOf(UNTRANSLATABLE_STRING_IN_SUBTYPE_NAME); } return getSubtypeLocaleDisplayNameInternal(subtype.getLocale(), displayLocale); }
private static String getReplacementString(final InputMethodSubtype subtype, final Locale displayLocale) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN && subtype.containsExtraValueKey(UNTRANSLATABLE_STRING_IN_SUBTYPE_NAME)) { return subtype.getExtraValueOf(UNTRANSLATABLE_STRING_IN_SUBTYPE_NAME); } else { return getSubtypeLocaleDisplayNameInternal(subtype.getLocale(), displayLocale); } }
@NonNull public static String getKeyboardLayoutSetName(final InputMethodSubtype subtype) { String keyboardLayoutSet = subtype.getExtraValueOf(KEYBOARD_LAYOUT_SET); if (keyboardLayoutSet == null) { // This subtype doesn't have a keyboardLayoutSet extra value, so lookup its keyboard // layout set in sLocaleAndExtraValueToKeyboardLayoutSetMap to keep it compatible with // pre-JellyBean. final String key = subtype.getLocale() + ":" + subtype.getExtraValue(); keyboardLayoutSet = sLocaleAndExtraValueToKeyboardLayoutSetMap.get(key); } // TODO: Remove this null check when InputMethodManager.getCurrentInputMethodSubtype is // fixed. if (keyboardLayoutSet == null) { android.util.Log.w(TAG, "KeyboardLayoutSet not found, use QWERTY: " + "locale=" + subtype.getLocale() + " extraValue=" + subtype.getExtraValue()); return QWERTY; } return keyboardLayoutSet; } }
public static String getKeyboardLayoutSetName(final InputMethodSubtype subtype) { String keyboardLayoutSet = subtype.getExtraValueOf(KEYBOARD_LAYOUT_SET); if (keyboardLayoutSet == null) { // This subtype doesn't have a keyboardLayoutSet extra value, so lookup its keyboard // layout set in sLocaleAndExtraValueToKeyboardLayoutSetMap to keep it compatible with // pre-JellyBean. final String key = subtype.getLocale() + ":" + subtype.getExtraValue(); keyboardLayoutSet = sLocaleAndExtraValueToKeyboardLayoutSetMap.get(key); } // TODO: Remove this null check when InputMethodManager.getCurrentInputMethodSubtype is // fixed. if (keyboardLayoutSet == null) { android.util.Log.w(TAG, "KeyboardLayoutSet not found, use QWERTY: " + "locale=" + subtype.getLocale() + " extraValue=" + subtype.getExtraValue()); return QWERTY; } return keyboardLayoutSet; }
@Override public String toString() { return String.format(Locale.ROOT, "[%s %s:%s %dx%d %s %s%s%s%s%s%s%s%s]", elementIdToName(mElementId), mLocale, mSubtype.getExtraValueOf(KEYBOARD_LAYOUT_SET), mWidth, mHeight, modeName(mMode), actionName(imeAction()), (navigateNext() ? " navigateNext" : ""), (navigatePrevious() ? " navigatePrevious" : ""), (mClobberSettingsKey ? " clobberSettingsKey" : ""), (passwordInput() ? " passwordInput" : ""), (mHasShortcutKey ? " hasShortcutKey" : ""), (mLanguageSwitchKeyEnabled ? " languageSwitchKeyEnabled" : ""), (isMultiLine() ? " isMultiLine" : "") ); }