Loading java/src/com/android/inputmethod/latin/SubtypeLocale.java +7 −3 Original line number Diff line number Diff line Loading @@ -68,14 +68,14 @@ public class SubtypeLocale { } if (isNoLanguage(subtype)) { return getKeyboardLayoutSetName(subtype).toUpperCase(); return getKeyboardLayoutSetDisplayName(subtype); } final Locale locale = getSubtypeLocale(subtype); final String language = StringUtils.toTitleCase(locale.getDisplayLanguage(locale), locale); if (AdditionalSubtype.isAdditionalSubtype(subtype)) { return String.format("%s (%s)", language, getKeyboardLayoutSetName(subtype).toUpperCase()); language, getKeyboardLayoutSetDisplayName(subtype)); } return StringUtils.toTitleCase(locale.getDisplayName(locale), locale); } Loading @@ -83,7 +83,7 @@ public class SubtypeLocale { // Get InputMethodSubtype's middle display name in its locale. public static String getMiddleDisplayName(InputMethodSubtype subtype) { if (isNoLanguage(subtype)) { return getKeyboardLayoutSetName(subtype).toUpperCase(); return getKeyboardLayoutSetDisplayName(subtype); } final Locale locale = getSubtypeLocale(subtype); return StringUtils.toTitleCase(locale.getDisplayLanguage(locale), locale); Loading @@ -108,6 +108,10 @@ public class SubtypeLocale { return LocaleUtils.constructLocaleFromString(localeString); } public static String getKeyboardLayoutSetDisplayName(InputMethodSubtype subtype) { return getKeyboardLayoutSetName(subtype).toUpperCase(); } public static String getKeyboardLayoutSetName(InputMethodSubtype subtype) { final String keyboardLayoutSet = subtype.getExtraValueOf( LatinIME.SUBTYPE_EXTRA_VALUE_KEYBOARD_LAYOUT_SET); Loading Loading
java/src/com/android/inputmethod/latin/SubtypeLocale.java +7 −3 Original line number Diff line number Diff line Loading @@ -68,14 +68,14 @@ public class SubtypeLocale { } if (isNoLanguage(subtype)) { return getKeyboardLayoutSetName(subtype).toUpperCase(); return getKeyboardLayoutSetDisplayName(subtype); } final Locale locale = getSubtypeLocale(subtype); final String language = StringUtils.toTitleCase(locale.getDisplayLanguage(locale), locale); if (AdditionalSubtype.isAdditionalSubtype(subtype)) { return String.format("%s (%s)", language, getKeyboardLayoutSetName(subtype).toUpperCase()); language, getKeyboardLayoutSetDisplayName(subtype)); } return StringUtils.toTitleCase(locale.getDisplayName(locale), locale); } Loading @@ -83,7 +83,7 @@ public class SubtypeLocale { // Get InputMethodSubtype's middle display name in its locale. public static String getMiddleDisplayName(InputMethodSubtype subtype) { if (isNoLanguage(subtype)) { return getKeyboardLayoutSetName(subtype).toUpperCase(); return getKeyboardLayoutSetDisplayName(subtype); } final Locale locale = getSubtypeLocale(subtype); return StringUtils.toTitleCase(locale.getDisplayLanguage(locale), locale); Loading @@ -108,6 +108,10 @@ public class SubtypeLocale { return LocaleUtils.constructLocaleFromString(localeString); } public static String getKeyboardLayoutSetDisplayName(InputMethodSubtype subtype) { return getKeyboardLayoutSetName(subtype).toUpperCase(); } public static String getKeyboardLayoutSetName(InputMethodSubtype subtype) { final String keyboardLayoutSet = subtype.getExtraValueOf( LatinIME.SUBTYPE_EXTRA_VALUE_KEYBOARD_LAYOUT_SET); Loading