Fix a race when an editText was removed and added immediately again
In some rare cases, the hide request that was triggered by removing a view was applied in InsetsController too late. A following show request could have been applied before, resulting in the IME not being shown. This was caused by InputMethodManager, as some methods (e.g., closeCurrentInput()) did not call into InsetsController#hide, but into IMMS. This CL fixes this race condition by calling directly into InsetsController#hide, instead of using IInputMethodManagerGlobalInvoker. Test: atest WindowInsetsControllerTests#testShowIme_immediatelyAfterDetachAndReattach --rerun-until-failure 100 Fix: 373971329 Flag: android.view.inputmethod.refactor_insets_controller Change-Id: Ib2dc444d3d08b23e36df1c2c72e630115804f80f
Loading
Please register or sign in to comment