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

Commit c10bcedc authored by Filip Gruszczynski's avatar Filip Gruszczynski
Browse files

Fix leak of decor view children.

When activity doesn't have a non client decor view but we preserve its
windows, we need to remove the children directly from the decor view
instead.

Bug: 24750271
Change-Id: I50e83ef61deba92e668ee165c4a297547a56071f
parent 38f43137
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -488,9 +488,15 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
    }

    public void clearContentView() {
        if (mNonClientDecorView != null && mNonClientDecorView.getChildCount() > 1) {
        if (mNonClientDecorView != null) {
            if (mNonClientDecorView.getChildCount() > 1) {
                mNonClientDecorView.removeViewAt(1);
            }
        } else {
            // This window doesn't have non client decor, so we need to just remove the children
            // of the decor view.
            mDecor.removeAllViews();
        }
    }

    private void transitionTo(Scene scene) {