summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsatok <satok@google.com>2011-07-22 20:14:27 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-07-22 20:14:27 -0700
commitb54ac4ab5b4c50ea09182e0bb19c4af08b0e0730 (patch)
tree3996702e69a9167c47ddaef48f47334503e13c05
parentda89e57130363a9b35983368f0f8df3237a9dbfd (diff)
parent5bc8e732bd831a308a5bc1720b0e4c9300d32f67 (diff)
downloadframeworks_base-b54ac4ab5b4c50ea09182e0bb19c4af08b0e0730.zip
frameworks_base-b54ac4ab5b4c50ea09182e0bb19c4af08b0e0730.tar.gz
frameworks_base-b54ac4ab5b4c50ea09182e0bb19c4af08b0e0730.tar.bz2
Merge "Display the current ime and subtype name in the ongoing notification"
-rw-r--r--services/java/com/android/server/InputMethodManagerService.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index d39f565f..73d790a 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -1127,13 +1127,21 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
mBackDisposition = backDisposition;
mStatusBar.setImeWindowStatus(token, vis, backDisposition);
final boolean iconVisibility = (vis & InputMethodService.IME_ACTIVE) != 0;
- if (iconVisibility && needsToShowImeSwitchOngoingNotification()) {
+ final InputMethodInfo imi = mMethodMap.get(mCurMethodId);
+ if (imi != null && iconVisibility && needsToShowImeSwitchOngoingNotification()) {
final PackageManager pm = mContext.getPackageManager();
- final CharSequence label = mMethodMap.get(mCurMethodId).loadLabel(pm);
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;
+
mImeSwitcherNotification.setLatestEventInfo(
- mContext, title, label, mImeSwitchPendingIntent);
+ mContext, title, summary, mImeSwitchPendingIntent);
mNotificationManager.notify(
com.android.internal.R.string.select_input_method,
mImeSwitcherNotification);