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

Commit 6b8dd93f authored by Louis Chang's avatar Louis Chang
Browse files

Reset DisplayContent while a Task is removed from the hierarchy

This is mostly to consolidate the code, which is just a refactor
without logic changes.

Bug: 168037178
Test: wm presubmit
Flag: EXEMPT bugfix
Change-Id: I984836a904b07dd5cc71c185b51058fa7ea368e4
parent 310f7b88
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -1122,17 +1122,6 @@ class Task extends TaskFragment {
        // already ran fully within super.onParentChanged
        updateTaskOrganizerState();

        // TODO(b/168037178): The check for null display content and setting it to null doesn't
        //                    really make sense here...

        // TODO(b/168037178): This is mostly taking care of the case where the stask is removing
        //                    from the display, so we should probably consolidate it there instead.

        if (getParent() == null && mDisplayContent != null) {
            mDisplayContent = null;
            mWmService.mWindowPlacerLocked.requestTraversal();
        }

        if (oldParent != null) {
            final Task oldParentTask = oldParent.asTask();
            if (oldParentTask != null) {
@@ -2770,6 +2759,7 @@ class Task extends TaskFragment {
        }

        super.removeImmediately();
        mDisplayContent = null;
        mRemoving = false;
    }