Merge "Attempt to fix updateImeParent transaction synchronized issue" into sc-v2-dev

This commit is contained in:
TreeHugger Robot
2022-01-10 11:02:22 +00:00
committed by Android (Google) Code Review

View File

@@ -4165,10 +4165,10 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
final SurfaceControl newParent = computeImeParent(); final SurfaceControl newParent = computeImeParent();
if (newParent != null && newParent != mInputMethodSurfaceParent) { if (newParent != null && newParent != mInputMethodSurfaceParent) {
mInputMethodSurfaceParent = newParent; mInputMethodSurfaceParent = newParent;
getPendingTransaction().reparent(mImeWindowsContainer.mSurfaceControl, newParent); getSyncTransaction().reparent(mImeWindowsContainer.mSurfaceControl, newParent);
// When surface parent is removed, the relative layer will also be removed. We need to // When surface parent is removed, the relative layer will also be removed. We need to
// do a force update to make sure there is a layer set for the new parent. // do a force update to make sure there is a layer set for the new parent.
assignRelativeLayerForIme(getPendingTransaction(), true /* forceUpdate */); assignRelativeLayerForIme(getSyncTransaction(), true /* forceUpdate */);
scheduleAnimation(); scheduleAnimation();
} }
} }