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

Commit 01732bb3 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Use IMM#invalidateInput() in EditText#setText()

With this CL, EditText#setText() actually starts using

  InputMethodManger#invalidateInput(),

which does not block the UI thread.

See the previous CL [1] about how that API actually works.

There should be no observable changes from the viewpoing of IMEs.

 [1]: I3161755779080f98bcef0e47dd0c5247d8a3a256

Bug: 203086369
Test: atest CtsInputMethodTestCases:EditTextImeSupportTest
Change-Id: I8d2e0be22454b106ded15c78c876b55dc6e60a13
parent daa6695c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1848,7 +1848,7 @@ public class Editor {
        if (mHasPendingRestartInputForSetText) {
            final InputMethodManager imm = getInputMethodManager();
            if (imm != null) {
                imm.restartInput(mTextView);
                imm.invalidateInput(mTextView);
            }
            mHasPendingRestartInputForSetText = false;
        }