Always update IME control target

During rotation, IME window's animation is cancelled that revokes
control from client. By sending control always to client, IME is
controllable after rotation as well.

Test: Manually using steps in bug
Bug: 149920295
Change-Id: I28031ab3d4967202bbb63475616e09223f7f1991
This commit is contained in:
Tarandeep Singh
2020-03-06 18:20:16 -08:00
committed by Taran Singh
parent b092cecbd3
commit 3ef9b33c03

View File

@@ -3522,6 +3522,8 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
}
private void setInputMethodTarget(WindowState target, boolean targetWaitingAnim) {
// Always update control target. This is needed to handle rotation.
updateImeControlTarget(target);
if (target == mInputMethodTarget && mInputMethodTargetWaitingAnim == targetWaitingAnim) {
return;
}
@@ -3529,7 +3531,6 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
mInputMethodTarget = target;
mInputMethodTargetWaitingAnim = targetWaitingAnim;
assignWindowLayers(false /* setLayoutNeeded */);
updateImeControlTarget(mInputMethodTarget);
updateImeParent();
}