diff options
author | satok <satok@google.com> | 2011-07-22 21:07:23 +0900 |
---|---|---|
committer | satok <satok@google.com> | 2011-07-23 12:07:38 +0900 |
commit | 5bc8e732bd831a308a5bc1720b0e4c9300d32f67 (patch) | |
tree | 09ccce6fa49fe3a4e1d70b71ebd8bff2537b4221 /services/java/com | |
parent | 3263f02b3e4b9c37bf8ec4e00b3cec32ede42ad8 (diff) | |
download | frameworks_base-5bc8e732bd831a308a5bc1720b0e4c9300d32f67.zip frameworks_base-5bc8e732bd831a308a5bc1720b0e4c9300d32f67.tar.gz frameworks_base-5bc8e732bd831a308a5bc1720b0e4c9300d32f67.tar.bz2 |
Display the current ime and subtype name in the ongoing notification
Bug: 4903422
Change-Id: I3eaeb3decb75f687ad2af0d80340b819229c3ebe
Diffstat (limited to 'services/java/com')
-rw-r--r-- | services/java/com/android/server/InputMethodManagerService.java | 14 |
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); |