Add an api to get the display name for InputMethodSubtype
Bug: 4321667
Change-Id: I55aa844ff33dae0cf8ef00072e87727992eb77c1
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index c96273b..f4308cd 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -1885,8 +1885,8 @@
int nameResId = subtype.getNameResId();
String mode = subtype.getMode();
if (nameResId != 0) {
- title = TextUtils.concat(pm.getText(imi.getPackageName(),
- nameResId, imi.getServiceInfo().applicationInfo),
+ title = TextUtils.concat(subtype.getDisplayName(context,
+ imi.getPackageName(), imi.getServiceInfo().applicationInfo),
(TextUtils.isEmpty(label) ? "" : " (" + label + ")"));
} else {
CharSequence language = subtype.getLocale();