summaryrefslogtreecommitdiff
path: root/libs/androidfw/misc.cpp
diff options
context:
space:
mode:
author Kohsuke Yatoh <kyatoh@google.com> 2022-04-12 15:14:53 -0700
committer Kohsuke Yatoh <kyatoh@google.com> 2022-04-21 21:34:24 +0000
commit48441703770de186ae9e81aadd6be38233812a4d (patch)
tree29e5b2d7df657ddaa4604fdf1070f43877cbd56a /libs/androidfw/misc.cpp
parent6584dbb6e6026a2698f31cea41f8e66698f67a54 (diff)
Notify IMMS synchronously on IME insets hidden.
Currently, IMMS will be notified asynchronously when an IME hide animation finishes, via message dispatching through IMS (IMM#notifyImeHidden -> IMS#notifyImeHidden -> IMMS#hideMySoftInput). This creates a race condition when IMM#showSoftInput or WIC#show is called around the end of hide animation. This CL fixes the race condition by synchronously and directly calling IMMS#hideSoftInput from IMM#notifyImeHidden. Note that there is still another race condition for IMM#showSoftInput (not WIC#show) if it's called during an IME hide animation; IMM#showSoftInput ended up calling WIC#show asynchronously, but at that time the running IME hide animation may have already been finished successfully and WIC#show may fail to cancel the hide animation (then the cleanup IMM#notifyImeHidden hides the IME again disruptively). I will fix the latter issue in a separate CL. Bug: 221483132 Bug: 225674038 Test: atest InputMethodStressTest Test: atest CtsInputMethodTestCases Test: atest WindowInsetsAnimationControllerTests Change-Id: I7c71dc5a1d6b61aa79d1666f0e257e6401e4adb2 (cherry picked from commit 9065310f814d38c5d8dea5f01655b30e4996fef4) Merged-In: I7c71dc5a1d6b61aa79d1666f0e257e6401e4adb2
Diffstat (limited to 'libs/androidfw/misc.cpp')
0 files changed, 0 insertions, 0 deletions