Loading services/core/java/com/android/server/InputMethodManagerService.java +6 −12 Original line number Diff line number Diff line Loading @@ -2966,16 +2966,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub return; } setInputMethodLocked(nextSubtype.mImi.getId(), nextSubtype.mSubtypeId); if (mSubtypeSwitchedByShortCutToast != null) { mSubtypeSwitchedByShortCutToast.cancel(); mSubtypeSwitchedByShortCutToast = null; } if ((mImeWindowVis & InputMethodService.IME_VISIBLE) != 0) { // IME window is shown. The user should be able to visually understand that the // subtype is changed in most of cases. To avoid UI overlap, we do not show a toast // in this case. return; } final InputMethodInfo newInputMethodInfo = mMethodMap.get(mCurMethodId); if (newInputMethodInfo == null) { return; Loading @@ -2983,8 +2973,12 @@ public class InputMethodManagerService extends IInputMethodManager.Stub final CharSequence toastText = InputMethodUtils.getImeAndSubtypeDisplayName(mContext, newInputMethodInfo, mCurrentSubtype); if (!TextUtils.isEmpty(toastText)) { mSubtypeSwitchedByShortCutToast = Toast.makeText(mContext, toastText.toString(), if (mSubtypeSwitchedByShortCutToast == null) { mSubtypeSwitchedByShortCutToast = Toast.makeText(mContext, toastText, Toast.LENGTH_SHORT); } else { mSubtypeSwitchedByShortCutToast.setText(toastText); } mSubtypeSwitchedByShortCutToast.show(); } } Loading Loading
services/core/java/com/android/server/InputMethodManagerService.java +6 −12 Original line number Diff line number Diff line Loading @@ -2966,16 +2966,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub return; } setInputMethodLocked(nextSubtype.mImi.getId(), nextSubtype.mSubtypeId); if (mSubtypeSwitchedByShortCutToast != null) { mSubtypeSwitchedByShortCutToast.cancel(); mSubtypeSwitchedByShortCutToast = null; } if ((mImeWindowVis & InputMethodService.IME_VISIBLE) != 0) { // IME window is shown. The user should be able to visually understand that the // subtype is changed in most of cases. To avoid UI overlap, we do not show a toast // in this case. return; } final InputMethodInfo newInputMethodInfo = mMethodMap.get(mCurMethodId); if (newInputMethodInfo == null) { return; Loading @@ -2983,8 +2973,12 @@ public class InputMethodManagerService extends IInputMethodManager.Stub final CharSequence toastText = InputMethodUtils.getImeAndSubtypeDisplayName(mContext, newInputMethodInfo, mCurrentSubtype); if (!TextUtils.isEmpty(toastText)) { mSubtypeSwitchedByShortCutToast = Toast.makeText(mContext, toastText.toString(), if (mSubtypeSwitchedByShortCutToast == null) { mSubtypeSwitchedByShortCutToast = Toast.makeText(mContext, toastText, Toast.LENGTH_SHORT); } else { mSubtypeSwitchedByShortCutToast.setText(toastText); } mSubtypeSwitchedByShortCutToast.show(); } } Loading