Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dbf956b6 authored by Robert Carr's avatar Robert Carr Committed by android-build-merger
Browse files

Merge "Ensure getParentSurfaceControl and getSurfaceControl return valid or null SC" into qt-dev

am: ce3cd94e

Change-Id: I468d9fbccb2f2b5443dc082ce4582dbaea441fb0
parents ec004112 ce3cd94e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -130,6 +130,7 @@ class Dimmer {
            mSurfaceAnimator = new SurfaceAnimator(dimAnimatable, () -> {
                if (!mDimming) {
                    dimAnimatable.getPendingTransaction().remove(mDimLayer);
                    mDimLayer = null;
                }
            }, mHost.mWmService);
        }
+2 −0
Original line number Diff line number Diff line
@@ -410,11 +410,13 @@ class SurfaceAnimator {

        /**
         * @return The surface of the object to be animated.
         *         This SurfaceControl must be valid if non-null.
         */
        @Nullable SurfaceControl getSurfaceControl();

        /**
         * @return The parent of the surface object to be animated.
         *         This SurfaceControl must be valid if non-null.
         */
        @Nullable SurfaceControl getParentSurfaceControl();

+1 −0
Original line number Diff line number Diff line
@@ -93,6 +93,7 @@ class TaskScreenshotAnimatable implements SurfaceAnimator.Animatable {
    @Override
    public void onAnimationLeashDestroyed(SurfaceControl.Transaction t) {
        t.remove(mSurfaceControl);
        mSurfaceControl = null;
    }

    @Override
+8 −1
Original line number Diff line number Diff line
@@ -1003,7 +1003,10 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
        return p.makeChildSurface(child)
                .setParent(mSurfaceControl);
    }

    /*
     * @return The SurfaceControl parent for this containers SurfaceControl.
     *         The SurfaceControl must be valid if non-null.
     */
    @Override
    public SurfaceControl getParentSurfaceControl() {
        final WindowContainer parent = getParent();
@@ -1210,6 +1213,10 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
        }
    }

    /**
     * @return The SurfaceControl for this container.
     *         The SurfaceControl must be valid if non-null.
     */
    @Override
    public SurfaceControl getSurfaceControl() {
        return mSurfaceControl;