Skip to content
Commit 280cb211 authored by lumark's avatar lumark
Browse files

Make sure to clear previous display's last focus window when reparenting task

This CL is to fix IME can't show up on reparented task in auto device with per-display
focus enabled.

When reparenting task from display A to display B, if the current display focus from
display of the task changed to another display (i.e. received a pointer outside touch),

It made in DisplayContent#reParentWindowToken logic won't clear prevDc#mLastFocus
(the reparent task's window in previous display), since mCurrentFocus
(the target display's window) is not the same as prevDc#mLastFocus during reparent,
caused the client side will end up receive window focus lost change (this issue won't
happen w/o per-display focus, since prevDc#mLastFocus will always null due to only
single focus window), so IME can't show up when tapping the EditText of the reparented
task.

The fix is to consolide clear prevDc#mLastFocus check, if last focused window of
previous display is contained in a reparented window token, which means
the reparent task will end up to gain window focus on the target display & won't need to
receive focus lost event from previous display & the state should be cleared.

Bug: 136503036
Test: atest MultiDisplaySystemDecorationTests#testImeWindowCanShownWhenActivityMovedToDisplay
Change-Id: Ifd5b7bbf381440c302194c9efff595bf51b5b42b
parent 8a91775d
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