Use getDisplayName for the name of InputMethodSubtype

Change-Id: I9ad7790bc36ff2950e0238cae8ce3b785bb8eaa1
This commit is contained in:
satok
2011-06-08 18:44:52 +09:00
parent f41be7908b
commit f0ae329740
2 changed files with 12 additions and 20 deletions

View File

@@ -266,7 +266,6 @@ public class InputMethodConfig extends SettingsPreferenceFragment {
private void updateActiveInputMethodsSummary() {
final InputMethodManager imm =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
final PackageManager pm = getPackageManager();
for (InputMethodInfo imi: mActiveInputMethodsPrefMap.keySet()) {
Preference pref = mActiveInputMethodsPrefMap.get(imi);
List<InputMethodSubtype> subtypes = imm.getEnabledInputMethodSubtypeList(imi, true);
@@ -276,8 +275,9 @@ public class InputMethodConfig extends SettingsPreferenceFragment {
if (subtypeAdded) {
summary.append(", ");
}
summary.append(pm.getText(imi.getPackageName(), subtype.getNameResId(),
imi.getServiceInfo().applicationInfo));
final CharSequence subtypeLabel = subtype.getDisplayName(getActivity(),
imi.getPackageName(), imi.getServiceInfo().applicationInfo);
summary.append(subtypeLabel);
subtypeAdded = true;
}
pref.setSummary(summary.toString());