diff options
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java index 9adb67c8a65e..2d6ba6ee7217 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java @@ -594,7 +594,6 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler { .setName("animation-background") .setCallsite("DefaultTransitionHandler") .setColorLayer(); - final SurfaceControl backgroundSurface = colorLayerBuilder.build(); // Attaching the background surface to the transition root could unexpectedly make it // cover one of the split root tasks. To avoid this, put the background surface just @@ -605,8 +604,10 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler { if (isSplitTaskInvolved) { mRootTDAOrganizer.attachToDisplayArea(displayId, colorLayerBuilder); } else { - startTransaction.reparent(backgroundSurface, info.getRootLeash()); + colorLayerBuilder.setParent(info.getRootLeash()); } + + final SurfaceControl backgroundSurface = colorLayerBuilder.build(); startTransaction.setColor(backgroundSurface, colorArray) .setLayer(backgroundSurface, -1) .show(backgroundSurface); |