Merge "Prevent setting position to a surface attached to leash" into tm-qpr-dev am: eecdde1839 am: 760a121a5d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18964589

Change-Id: I6538173dcb1a48442baf9da4241bc3694f0fe441
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jerry Chang
2022-06-21 01:57:19 +00:00
committed by Automerger Merge Worker

View File

@@ -809,7 +809,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
};
private final Consumer<SurfaceControl.Transaction> mSetSurfacePositionConsumer = t -> {
if (mSurfaceControl != null && mSurfaceControl.isValid()) {
// Only apply the position to the surface when there's no leash created.
if (mSurfaceControl != null && mSurfaceControl.isValid() && !mSurfaceAnimator.hasLeash()) {
t.setPosition(mSurfaceControl, mSurfacePosition.x, mSurfacePosition.y);
}
};