Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1254111d authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Revert "Make sure that Toast is always shown by Meta-Space."

This reverts commit b2f901ab [1].

Reason for revert: to deprecate Meta-Space.

 [1]: I551c51cd672dba6e7693d23cb181007f51b0de9d

Bug: 79150878
Test: manual
Change-Id: I3ae5e5447fea442b5917f0aacb82e68a22d781ab
parent a311b3f1
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -3557,6 +3557,16 @@ 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;
@@ -3564,12 +3574,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
            final CharSequence toastText = InputMethodUtils.getImeAndSubtypeDisplayName(mContext,
                    newInputMethodInfo, mCurrentSubtype);
            if (!TextUtils.isEmpty(toastText)) {
                if (mSubtypeSwitchedByShortCutToast == null) {
                    mSubtypeSwitchedByShortCutToast = Toast.makeText(mContext, toastText,
                mSubtypeSwitchedByShortCutToast = Toast.makeText(mContext, toastText.toString(),
                        Toast.LENGTH_SHORT);
                } else {
                    mSubtypeSwitchedByShortCutToast.setText(toastText);
                }
                mSubtypeSwitchedByShortCutToast.show();
            }
        }