summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/InputMethodManagerService.java
diff options
context:
space:
mode:
authorSatoshi Kataoka <satok@google.com>2013-07-04 19:43:14 +0900
committerSatoshi Kataoka <satok@google.com>2013-07-09 23:20:06 +0900
commitb282726d8604dad3ac06e9d8bf167f19332a05d7 (patch)
tree312ab6fd107298452c0564c7bc5bbf753ca43136 /services/java/com/android/server/InputMethodManagerService.java
parent38b2322567e2407753cc9a4bed626b3cc47ccece (diff)
Consolidate InputMethodUtils
Change-Id: Ib5a5f3af8ea9eaaa81697d13c20abe28121e7373
Diffstat (limited to 'services/java/com/android/server/InputMethodManagerService.java')
-rw-r--r--services/java/com/android/server/InputMethodManagerService.java13
1 files changed, 3 insertions, 10 deletions
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index 6e24d68301e7..1c1b0020b462 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -1511,23 +1511,16 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
final InputMethodInfo imi = mMethodMap.get(mCurMethodId);
if (imi != null && iconVisibility && needsToShowImeSwitchOngoingNotification()) {
// Used to load label
- final PackageManager pm = mContext.getPackageManager();
final CharSequence title = mRes.getText(
com.android.internal.R.string.select_input_method);
- final CharSequence imiLabel = imi.loadLabel(pm);
- final CharSequence summary = mCurrentSubtype != null
- ? TextUtils.concat(mCurrentSubtype.getDisplayName(mContext,
- imi.getPackageName(), imi.getServiceInfo().applicationInfo),
- (TextUtils.isEmpty(imiLabel) ?
- "" : " - " + imiLabel))
- : imiLabel;
+ final CharSequence summary = InputMethodUtils.getImeAndSubtypeDisplayName(
+ mContext, imi, mCurrentSubtype);
mImeSwitcherNotification.setLatestEventInfo(
mContext, title, summary, mImeSwitchPendingIntent);
if (mNotificationManager != null) {
if (DEBUG) {
- Slog.d(TAG, "--- show notification: label = " + imiLabel
- + ", summary = " + summary);
+ Slog.d(TAG, "--- show notification: label = " + summary);
}
mNotificationManager.notifyAsUser(null,
com.android.internal.R.string.select_input_method,