Fix IME flicker when switching recents tasks
CL[1] fixed the IME relative layer issue on editor dialog fragment
when swiping up to recents without seeing the IME behinds the dimming
layer.
However, this introduced another IME flickering when switching tasks
with selecting task on the overview screen. The scenerio is:
- Focusing an app to show IME
- Swiping up to go to the overview screen
- Selecting another task
The flickering happens to see the "transformed" IME surface that
originally belongs to the previous task, but accidentally on top of
the selected task during animating the recents task.
That's because we removed recents animation animating state in
DC#assignRelativeLayerForIme, so that IME can placed on the selected
task, but it doesn't make sense to have relative Z of the IME, if the
task is not yet to be the IME control target.
Consolide "canImeTargetSetRelativeLayer" check
in DC#assignRelativeLayerForIme with checking if the current layering
target is IME control target. Will not set relative Z if the target is
not yet to be IME control target.
[1]: I3024443c21cfb1c7971f3999640039caea10d0d5
Bug: 201139555
Bug: 204140533
Test: atest ZOrderingTests
Merged-In: Iae65d6047c02dae241f2df21c666a03cca58fd0b
Change-Id: Iae65d6047c02dae241f2df21c666a03cca58fd0b
2 files changed