summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2021-12-16 12:45:41 -0800
committerYohei Yukawa <yukawa@google.com>2021-12-16 12:45:41 -0800
commit60c7c55c36cf6115468affa11e24bd1544552f7f (patch)
tree856686d53078f74aa891718adfb1f072ee288947 /core/java/android/inputmethodservice
parent5270fe67b751e432eb46427dde85fdd0a9e88ec5 (diff)
Detect broken IC#endBatchEdit() impl at runtime
This is a safeguard against cases like Bug 203086369, where the UI thread can be locked up if IC#endBatchEdit() never returns false no matter how many times it gets called. With this CL, the system will have a max retry count on how many times it attempts to call IC#endBatchEdit(), which is currently set to 16, then fall back to InputMethodManager#restartInput(View) if it hits such a limit. This CL also introduces a volatile type cache to early fall back to the fallback implementation if the same type of InputConnection implementation class appears again. As long as InputConnection#{begin,end}BatchEdit() is correctly implemented, there should be no developer observable behavior change in this CL. See the corresponding test CL [1] about when the fallback implementation is used. [1]: Ifb80015ab0f0c32c917a80c4e5f60e836648e7b4 Bug: 203086369 Bug: 208941904 Bug: 209008342 Test: atest CtsInputMethodTestCases:InputMethodStartInputLifecycleTest Change-Id: I109e0c26d8249fc2e01323e3e1cb36395fa7cc97
Diffstat (limited to 'core/java/android/inputmethodservice')
0 files changed, 0 insertions, 0 deletions