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
This commit is contained in:
@@ -1848,7 +1848,7 @@ public class Editor {
|
||||
if (mHasPendingRestartInputForSetText) {
|
||||
final InputMethodManager imm = getInputMethodManager();
|
||||
if (imm != null) {
|
||||
imm.restartInput(mTextView);
|
||||
imm.invalidateInput(mTextView);
|
||||
}
|
||||
mHasPendingRestartInputForSetText = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user