summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-04-19 19:17:41 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-04-19 19:17:41 +0000
commit634b04de0f8d09299457fb520aa0854be0c8162f (patch)
tree2e98ce82ce68a3fc83b404f8726f09b5328d0f6a
parent71ee7d85a3f6e5fb282cdfb444a4caeddd5d65e2 (diff)
parente4c0cf0f9d8c947dd9735040ac0709d5652c1bd0 (diff)
Merge "Set parent on animation-background before building" into main
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java5
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);