summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/AbstractInputMethodService.java
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2021-09-16 16:17:09 -0700
committerYohei Yukawa <yukawa@google.com>2021-09-16 16:17:09 -0700
commit8821afef81ad0e09d77805dadea5b03725785bca (patch)
tree3e7070ac0a1600f26b52fa461da255c9392e268b /core/java/android/inputmethodservice/AbstractInputMethodService.java
parentb6d3eecb38c454fd8843e93a77be1482baaa09d6 (diff)
Preserve invocation order in RemoteInputConnection
This is a follow up CL to our previous CL [1], which introduced early-exit paths to some RemoteInputConnection methods to protect innocent IME clients from unexpected process crashes when an IME is calling InputConnection APIs with invalid parameters. Although protecting IME clients from crashes still makes much sense, implementing it as an early-exit style in RemoteInputConnection may expose observable inconsistency to IME developers in terms of the fact that InputConnection#getText{Before,After}Cursor() can also work as a fence operation that would not return until all the previously issued InputConnection API invocations are handled in the IME client side. With this CL, the following methods start behaving as a fence operation even when an invalid parameter is passed, by checking the parameters in the IME client side. * RemoteInputConnection#getTextAfterCursor() * RemoteInputConnection#getTextBeforeCursor() * RemoteInputConnection#getSurroundingText() There should be no performance impact for IMEs that do not make such an invalid (and unnecessary) API calls. [1]: I95169735198f8363c981a61e20234dfebfd645b1 1e72ef28933823594bf2b1993fed2d4895b20a67 Bug: 169114026 Fix: 194110780 Test: atest CtsInputMethodTestCases:InputConnectionEndToEndTest Change-Id: Ie0c18d0c9b8bf8f02f2fcdca5aac7e580c6bf2cd
Diffstat (limited to 'core/java/android/inputmethodservice/AbstractInputMethodService.java')
0 files changed, 0 insertions, 0 deletions