Skip to content
Commit a6beec8e authored by Adrian Roos's avatar Adrian Roos
Browse files

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
parent 7368ed7d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment