Loading libs/WindowManager/Shell/src/com/android/wm/shell/RootTaskDisplayAreaOrganizer.java +8 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,14 @@ public class RootTaskDisplayAreaOrganizer extends DisplayAreaOrganizer { b.setParent(sc); } /** * Sets the layer of {@param sc} to be relative to the TDA on {@param displayId}. */ public void relZToDisplayArea(int displayId, SurfaceControl sc, SurfaceControl.Transaction t, int z) { t.setRelativeLayer(sc, mLeashes.get(displayId), z); } /** * Re-parents the provided surface to the leash of the provided display. * Loading libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java +11 −10 Original line number Diff line number Diff line Loading @@ -658,10 +658,16 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler { for (int i = 0; i < info.getRootCount(); ++i) { final int displayId = info.getRoot(i).getDisplayId(); final SurfaceControl.Builder colorLayerBuilder = new SurfaceControl.Builder() .setName("animation-background") final SurfaceControl backgroundSurface = new SurfaceControl.Builder() .setName("animation-background for #" + info.getDebugId()) .setCallsite("DefaultTransitionHandler") .setColorLayer(); .setColorLayer() .setParent(info.getRoot(i).getLeash()) .build(); startTransaction.setColor(backgroundSurface, colorArray) .setLayer(backgroundSurface, -1) .show(backgroundSurface); // 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 Loading @@ -670,15 +676,10 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler { info.getChanges().stream().anyMatch(c-> c.getTaskInfo() != null && c.getTaskInfo().getWindowingMode() == WINDOWING_MODE_MULTI_WINDOW); if (isSplitTaskInvolved) { mRootTDAOrganizer.attachToDisplayArea(displayId, colorLayerBuilder); } else { colorLayerBuilder.setParent(info.getRootLeash()); mRootTDAOrganizer.relZToDisplayArea(displayId, backgroundSurface, startTransaction, -1); } final SurfaceControl backgroundSurface = colorLayerBuilder.build(); startTransaction.setColor(backgroundSurface, colorArray) .setLayer(backgroundSurface, -1) .show(backgroundSurface); finishTransaction.remove(backgroundSurface); } } Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/RootTaskDisplayAreaOrganizer.java +8 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,14 @@ public class RootTaskDisplayAreaOrganizer extends DisplayAreaOrganizer { b.setParent(sc); } /** * Sets the layer of {@param sc} to be relative to the TDA on {@param displayId}. */ public void relZToDisplayArea(int displayId, SurfaceControl sc, SurfaceControl.Transaction t, int z) { t.setRelativeLayer(sc, mLeashes.get(displayId), z); } /** * Re-parents the provided surface to the leash of the provided display. * Loading
libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java +11 −10 Original line number Diff line number Diff line Loading @@ -658,10 +658,16 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler { for (int i = 0; i < info.getRootCount(); ++i) { final int displayId = info.getRoot(i).getDisplayId(); final SurfaceControl.Builder colorLayerBuilder = new SurfaceControl.Builder() .setName("animation-background") final SurfaceControl backgroundSurface = new SurfaceControl.Builder() .setName("animation-background for #" + info.getDebugId()) .setCallsite("DefaultTransitionHandler") .setColorLayer(); .setColorLayer() .setParent(info.getRoot(i).getLeash()) .build(); startTransaction.setColor(backgroundSurface, colorArray) .setLayer(backgroundSurface, -1) .show(backgroundSurface); // 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 Loading @@ -670,15 +676,10 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler { info.getChanges().stream().anyMatch(c-> c.getTaskInfo() != null && c.getTaskInfo().getWindowingMode() == WINDOWING_MODE_MULTI_WINDOW); if (isSplitTaskInvolved) { mRootTDAOrganizer.attachToDisplayArea(displayId, colorLayerBuilder); } else { colorLayerBuilder.setParent(info.getRootLeash()); mRootTDAOrganizer.relZToDisplayArea(displayId, backgroundSurface, startTransaction, -1); } final SurfaceControl backgroundSurface = colorLayerBuilder.build(); startTransaction.setColor(backgroundSurface, colorArray) .setLayer(backgroundSurface, -1) .show(backgroundSurface); finishTransaction.remove(backgroundSurface); } } Loading