Use IMM#invalidateInput() in EditText#setText() (2nd try)
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 viewpoint of IMEs. Note that this CL was once reverted due to Bug 208941904, which was caused by a misbehaving InputConnection#endBatchEdit() implementation as a combination of the following bugs: * Chromium (crbug.com/1277732) * EditableInputConnection (Bug 209958658) Now those two bugs were addressed. We have also implemented a safeguard [2] against the same type of app issues so that the system can gracefully fall back to the previous behavior as needed. [1]: I3161755779080f98bcef0e47dd0c5247d8a3a256 daa6695c [2]: I109e0c26d8249fc2e01323e3e1cb36395fa7cc97 60c7c55c Bug: 203086369 Fix: 209008342 Test: atest CtsInputMethodTestCases Change-Id: I2ce4be729e23ef686e128f832f8cf7debdcd551e
Loading
Please register or sign in to comment