Merge "DisplayContent: Don't force-update parent if layering didn't change" into tm-dev

This commit is contained in:
Rob Carr
2022-03-30 19:59:00 +00:00
committed by Android (Google) Code Review

View File

@@ -3978,6 +3978,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
} }
ProtoLog.i(WM_DEBUG_IME, "setInputMethodTarget %s", target); ProtoLog.i(WM_DEBUG_IME, "setInputMethodTarget %s", target);
final boolean layeringTargetChanged = target != mImeLayeringTarget;
mImeLayeringTarget = target; mImeLayeringTarget = target;
// 1. Reparent the IME container window to the target root DA to get the correct bounds and // 1. Reparent the IME container window to the target root DA to get the correct bounds and
@@ -4005,7 +4006,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
// 4. Update the IME control target to apply any inset change and animation. // 4. Update the IME control target to apply any inset change and animation.
// 5. Reparent the IME container surface to either the input target app, or the IME window // 5. Reparent the IME container surface to either the input target app, or the IME window
// parent. // parent.
updateImeControlTarget(true /* forceUpdateImeParent */); updateImeControlTarget(layeringTargetChanged);
} }
@VisibleForTesting @VisibleForTesting