summaryrefslogtreecommitdiff
path: root/startop/scripts/lib/cmd_utils.py
diff options
context:
space:
mode:
authorAdrian Roos <roosa@google.com>2020-07-17 13:52:03 +0200
committerAdrian Roos <roosa@google.com>2020-07-17 14:45:58 +0200
commita6beec8e60daf023d4d853e85480b63117ff6b42 (patch)
tree83d1c245e418f956cd20ef8d4cfc129386512b6b /startop/scripts/lib/cmd_utils.py
parent7368ed7d038667d01b14cccfef050ef45e78d784 (diff)
Fix stuck IME when IME dialog is focused
Only the currently focused window will invoke startInput, and thus control the IME. However, if the IME puts up a focusable dialog, and the requesting activity restarts, its new window won't regain focus - because the IME dialog still has it. Thus, IMMS never receives a startInput, and never tells WMS about a new mInputMethodInputTarget. To address this, we clear mInputMethodInputTarget if it refers to a no longer existing window, then the empty IME control target will take over, and hide the IME, which will hide its dialog and let the newly launched WindowState obtain focus and ultimately control of the IME. Fixes: 160672060 Test: atest 'DisplayContentTests#testInputMethodInputTarget_isClearedWhenWindowStateIsRemoved' Change-Id: I138ac7198013635e7fb620921305ed1eb224d4de
Diffstat (limited to 'startop/scripts/lib/cmd_utils.py')
0 files changed, 0 insertions, 0 deletions