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

Commit 386b397b authored by Craig Mautner's avatar Craig Mautner Committed by Android (Google) Code Review
Browse files

Merge "Add null check and call destroy from single point."

parents 634ef35b 00a66754
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -373,10 +373,8 @@ public class TaskStack {
            mService.requestTraversalLocked();
        }

        mAnimationBackgroundSurface.destroySurface();
        mAnimationBackgroundSurface = null;
        mDimLayer.destroySurface();
        mDimLayer = null;
        close();

        mDisplayContent = null;
    }

@@ -501,8 +499,14 @@ public class TaskStack {
    }

    void close() {
        mDimLayer.mDimSurface.destroy();
        mAnimationBackgroundSurface.mDimSurface.destroy();
        if (mAnimationBackgroundSurface != null) {
            mAnimationBackgroundSurface.destroySurface();
            mAnimationBackgroundSurface = null;
        }
        if (mDimLayer != null) {
            mDimLayer.destroySurface();
            mDimLayer = null;
        }
    }

    public void dump(String prefix, PrintWriter pw) {