summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/AbstractInputMethodService.java
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2021-08-05 17:02:02 -0700
committerYohei Yukawa <yukawa@google.com>2021-08-05 17:02:02 -0700
commitd55ddf27c6cc7771d711d4b90f8bf85e5cba8615 (patch)
treeb9b926bd1eae12b0e32bea9d6c53fb7329b3f3df /core/java/android/inputmethodservice/AbstractInputMethodService.java
parenta4816fae9a1b3267b479fd3d8df6deca426d3195 (diff)
Ensure View#onInputConnectionClosedInternal() timing
This is a follow up CL to our previous CLs [1][2], which introduced an @hide callback View#onInputConnectionClosedInternal() to notify View when an is closed. What this CL aims to do is to fix a potential problem in a code path that has not been yet used. Thus there should be, in theory, no observable app compat impact. The problem is that RemoteInputConnectionImpl#deactivate() can dispatch A: View#onInputConnectionClosedInternal() before B: InputConnection#closeConnection() is completed when A and B need to be dispatched to two different threads. This can, in theory, happen when A: View#onInputConnectionClosedInternal() C: InputConnection#getHandler() are both explicitly overridden. That said, A is still @hide and only by TextView, which basically does not support InputConnection with a custom InputConnection#getHandler(). Anyway, with this CL A is guaranteed to happen after B under any circumstances. [1]: Iaafb0a03126c9292c24415f866dbdd72cadfa239 7b384751ea2a19beb7a635c52545742b2171ae8d [2]: I9280604e7ec7e8d08c1179e6bbf0068647a41040 7b384751ea2a19beb7a635c52545742b2171ae8d Bug: 163400105 Test: atest FrameworksCoreTests:ViewInputConnectionTest Change-Id: I8a0e321ecf6e0b3be4b6ab1a35e6ac7259826c2e
Diffstat (limited to 'core/java/android/inputmethodservice/AbstractInputMethodService.java')
0 files changed, 0 insertions, 0 deletions