Perform layout when IME target changes
WindowState.mBehindIme may change depending on the IME target, so we need to redo a layout. Test: InsetsStateControllerTest Fixes: 153576698 Change-Id: I64df22c3f0c46e9aed021aae6177e1c44d0cd96c
This commit is contained in:
@@ -3440,7 +3440,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
|
||||
|
||||
mInputMethodTarget = target;
|
||||
mInputMethodTargetWaitingAnim = targetWaitingAnim;
|
||||
assignWindowLayers(false /* setLayoutNeeded */);
|
||||
assignWindowLayers(true /* setLayoutNeeded */);
|
||||
updateImeParent();
|
||||
updateImeControlTarget();
|
||||
}
|
||||
|
||||
@@ -188,7 +188,6 @@ public class InsetsStateControllerTest extends WindowTestsBase {
|
||||
// Adding FLAG_NOT_FOCUSABLE makes app above IME.
|
||||
app.mAttrs.flags |= FLAG_NOT_FOCUSABLE;
|
||||
mDisplayContent.computeImeTarget(true);
|
||||
mDisplayContent.setLayoutNeeded();
|
||||
mDisplayContent.applySurfaceChangesTransaction();
|
||||
|
||||
// app won't get IME insets while above IME.
|
||||
@@ -200,7 +199,6 @@ public class InsetsStateControllerTest extends WindowTestsBase {
|
||||
// Removing FLAG_NOT_FOCUSABLE makes app below IME.
|
||||
app.mAttrs.flags &= ~FLAG_NOT_FOCUSABLE;
|
||||
mDisplayContent.computeImeTarget(true);
|
||||
mDisplayContent.setLayoutNeeded();
|
||||
mDisplayContent.applySurfaceChangesTransaction();
|
||||
|
||||
// Make sure app got notified.
|
||||
|
||||
Reference in New Issue
Block a user