Prevent setting position to a surface attached to leash
Make sure to only update surface position when it's not attached to
leash to prevent double offset the surface.
Fix: 232745449
Test: add log to verify taskbar won't disappear with the same flow in
bug.
Change-Id: Ide9a2a5ebee40783620a14d7d7835cd87d892140
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user