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

Commit 18ec40c4 authored by Jeff Brown's avatar Jeff Brown Committed by Android (Google) Code Review
Browse files

Merge "Destroy surfaces when display is removed."

parents 9fb9a1c5 2eb15342
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -427,6 +427,12 @@ class DisplayContent {
        }
    }

    void close() {
        for (int stackBoxNdx = mStackBoxes.size() - 1; stackBoxNdx >= 0; --stackBoxNdx) {
            mStackBoxes.get(stackBoxNdx).close();
        }
    }

    public void dump(String prefix, PrintWriter pw) {
        pw.print(prefix); pw.print("Display: mDisplayId="); pw.println(mDisplayId);
        final String subPrefix = "  " + prefix;
+10 −0
Original line number Diff line number Diff line
@@ -380,6 +380,16 @@ public class StackBox {
        mSecond.switchUserStacks(userId);
    }

    void close() {
        if (mStack != null) {
            mStack.mDimLayer.mDimSurface.destroy();
            mStack.mAnimationBackgroundSurface.mDimSurface.destroy();
            return;
        }
        mFirst.close();
        mSecond.close();
    }

    public void dump(String prefix, PrintWriter pw) {
        pw.print(prefix); pw.print("mParent="); pw.println(mParent);
        pw.print(prefix); pw.print("mBounds="); pw.print(mBounds.toShortString());
+1 −1
Original line number Diff line number Diff line
@@ -10818,7 +10818,7 @@ public class WindowManagerService extends IWindowManager.Stub
        final DisplayContent displayContent = getDisplayContentLocked(displayId);
        if (displayContent != null) {
            mDisplayContents.delete(displayId);

            displayContent.close();
            if (displayId == Display.DEFAULT_DISPLAY) {
                unregisterPointerEventListener(displayContent.mTapDetector);
            }