Loading services/core/java/com/android/server/wm/DisplayContent.java +16 −1 Original line number Diff line number Diff line Loading @@ -1319,7 +1319,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp for (int i = 0; i < mChildren.size(); i++) { SurfaceControl sc = mChildren.get(i).getSurfaceControl(); if (sc != null) { t.reparent(sc, mSurfaceControl); t.reparent(sc, getParentingSurfaceControl()); } } Loading Loading @@ -5828,6 +5828,21 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp || supportsSystemDecorations(); } /** * Returns the {@link SurfaceControl} where all the children should be parented on. * * <p> {@link DisplayContent} inserts a RootWrapper leash in the hierarchy above its original * {@link #mSurfaceControl} and then overrides the {@link #mSurfaceControl} to point to the * RootWrapper. * <p> To prevent inconsistent state later where the DAs might get re-parented to the * RootWrapper, this method should be used which returns the correct surface where the * re-parenting should happen. */ @Override SurfaceControl getParentingSurfaceControl() { return mWindowingLayer; } SurfaceControl getWindowingLayer() { return mWindowingLayer; } Loading services/core/java/com/android/server/wm/WindowContainer.java +12 −1 Original line number Diff line number Diff line Loading @@ -716,7 +716,7 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer< // If parent is null, the layer should be placed offscreen so reparent to null. Otherwise, // set to the available parent. t.reparent(mSurfaceControl, mParent == null ? null : mParent.getSurfaceControl()); t.reparent(mSurfaceControl, mParent == null ? null : mParent.getParentingSurfaceControl()); if (mLastRelativeToLayer != null) { t.setRelativeLayer(mSurfaceControl, mLastRelativeToLayer, mLastLayer); Loading Loading @@ -2906,6 +2906,17 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer< return mSurfaceControl; } /** * Returns the {@link SurfaceControl} where all the children should be parented on. * * A {@link WindowContainer} might insert intermediate leashes in the hierarchy and hence * {@link #getSurfaceControl} won't return the correct surface where the children should be * re-parented on. */ SurfaceControl getParentingSurfaceControl() { return getSurfaceControl(); } /** * Use this method instead of {@link #getPendingTransaction()} if the Transaction should be * synchronized with the client. Loading Loading
services/core/java/com/android/server/wm/DisplayContent.java +16 −1 Original line number Diff line number Diff line Loading @@ -1319,7 +1319,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp for (int i = 0; i < mChildren.size(); i++) { SurfaceControl sc = mChildren.get(i).getSurfaceControl(); if (sc != null) { t.reparent(sc, mSurfaceControl); t.reparent(sc, getParentingSurfaceControl()); } } Loading Loading @@ -5828,6 +5828,21 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp || supportsSystemDecorations(); } /** * Returns the {@link SurfaceControl} where all the children should be parented on. * * <p> {@link DisplayContent} inserts a RootWrapper leash in the hierarchy above its original * {@link #mSurfaceControl} and then overrides the {@link #mSurfaceControl} to point to the * RootWrapper. * <p> To prevent inconsistent state later where the DAs might get re-parented to the * RootWrapper, this method should be used which returns the correct surface where the * re-parenting should happen. */ @Override SurfaceControl getParentingSurfaceControl() { return mWindowingLayer; } SurfaceControl getWindowingLayer() { return mWindowingLayer; } Loading
services/core/java/com/android/server/wm/WindowContainer.java +12 −1 Original line number Diff line number Diff line Loading @@ -716,7 +716,7 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer< // If parent is null, the layer should be placed offscreen so reparent to null. Otherwise, // set to the available parent. t.reparent(mSurfaceControl, mParent == null ? null : mParent.getSurfaceControl()); t.reparent(mSurfaceControl, mParent == null ? null : mParent.getParentingSurfaceControl()); if (mLastRelativeToLayer != null) { t.setRelativeLayer(mSurfaceControl, mLastRelativeToLayer, mLastLayer); Loading Loading @@ -2906,6 +2906,17 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer< return mSurfaceControl; } /** * Returns the {@link SurfaceControl} where all the children should be parented on. * * A {@link WindowContainer} might insert intermediate leashes in the hierarchy and hence * {@link #getSurfaceControl} won't return the correct surface where the children should be * re-parented on. */ SurfaceControl getParentingSurfaceControl() { return getSurfaceControl(); } /** * Use this method instead of {@link #getPendingTransaction()} if the Transaction should be * synchronized with the client. Loading