Fix flickering when switched to the task without IME shown
When switching tasks from the task has IME shown to another task
without showing IME (e.g. youtube apps.), the flickering might happen
because the next activity accidentally received the IME insets attached
in the previous activity.
If the IME is attached to one app window on that time, even the next
app window is behind the IME window, conceptually the window should
not receive the IME insets if the next window is not eligible IME
requester and ready to show IME on top of it.
Fix the logic in InsetsPolicy#adjustVisibilityForIme for the above
case.
Fix: 192337037
Bug: 194746204
Test: atest WindowStateTests#\
testAdjustImeInsetsVisibilityWhenTaskSwitchIsAnimating
Merged-In: Ib3a1eacedd3763bcf1e6eed82e7efdf01c50b204
Change-Id: Ib3a1eacedd3763bcf1e6eed82e7efdf01c50b204
(cherry picked from commit f4eb0544601ced85aca5acac1b24f3fe8babfedd)
2 files changed