summaryrefslogtreecommitdiff
path: root/tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
diff options
context:
space:
mode:
authorMing-Shin Lu <lumark@google.com>2021-11-02 17:17:04 +0800
committerMing-Shin Lu <lumark@google.com>2021-11-02 16:19:18 +0000
commitfac4cdfce6d7e5f72eb1078309defb6d888d8fff (patch)
tree975bff903483f89ded24ff6a0864b6445aec0aec /tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
parenta208bcce58b183e2366fa96801febc4f9afe6fc7 (diff)
Fix unexpected hide IME cases
When testing testImeSwitchingWithoutWindowFocusAfterDisplayOffOnFull on the virtual device, the test flows will be: 1) Launch an activity and click the editor to show IME 2) Turn off/on the screen 3) Launch the IME picker dialog and expecting no window focus change. 4) Switch to another IME app and expect the IME visible after switched. Somehow the flaky point is in step 4) that if attaching the new input to show the IME comes first, before the input target updated to WM, in the meantime the app received onControlChanged callback with null control from WMS#relayoutWindow, then in ImeInsetsSourceConsumer#setControl -> hide() will end up calling notifyImeHidden for IME to invoke hideMySoftInput(), which is not expected result. As this unexpected IME hidden issue is related the timing issue of updating IME targets to WM a bit late and showing IME request happends from IMMS instead of from ImeInsetsSourceConsumer#requestShow. (i.e. consumer#hide() be invoked when mIsRequestedVisibleAwaitingControl is false but the control is null when setControl called) To fix this issue case, it looks make sense to check with ImeInsetsSourceConsumer#isRequestedVisibleAwaitingControl() when the null control callback in setControl(), since isRequestedVisibleAwaitingControl() will be true when requested the IME visible, so that it won't fall into hide() logic. Also, modified "Animation finished abruptly." debug log in InsetsAnimationControlImpl#applyChangeInsets to print only when the animation actually finished, since it does not make sense to print when the animation is not finish. Fix: 204524304 Test: atest InputMethodServiceLifecycleTest#\ testImeSwitchingWithoutWindowFocusAfterDisplayOffOnFull \ --rerun-until-failure 100 Change-Id: I3071af14bf78e23f9526d6a9c138ab6ae2e0e339
Diffstat (limited to 'tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp')
0 files changed, 0 insertions, 0 deletions