Loading
Optimize IME Input Target Update
In [1] we started reporting the Binder (token) of the startInputOrWindowGainedFocus window through InputMethodService setImeWindowStatus, sending this value to WindowManagerService, but not using it there. However, this was quite slow, and in many cases was reported after the IME started showing, so in [2] we modified this further to report the token through InputMethodService dispatchStartInput, into reportStartInputAsync, still without using the value in WindowManager. Later in [3] we started using the reported token to update the IME Control Target (and the IME Input Target). However, there is no need for this flow to take a round trip through InputMethodService, as there are no checks there, and we don't need to synchronize with the IME. Instead, all the checks are done inside the InputMethodManagerService. This optimizes the IME Input Target update flow by removing the round trip into InputMethodService, aiming to reduce some flickers that could be caused by slower updates. [1]: I54fb1faf513883a54293a756e4c9d2ae9453d778 [2]: I032b91ce722a16b17518a5d88015c574d7d3e51b [3]: I9e8984b7e5aa989a53ece9e2576393f795b9ef94 Flag: android.view.inputmethod.optimize_ime_input_target_update Bug: 427397699 Test: atest CtsInputMethodTestCases Change-Id: I8e25eb09c89b40b52f28d7e18124e43ecb8dc99e