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

Commit 59a60fa8 authored by Garfield Tan's avatar Garfield Tan
Browse files

Use isLeafTask() to check whether to save state.

We meant to save states for all leaf tasks, including one layer task,
which is excluded by the condition checked before.

Bug: 152318088
Test: Smoke tests.
Change-Id: Iadd8aa60ffe254398d242a12dae39148314891c8
parent a7c9f7cb
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -610,11 +610,7 @@ class Task extends WindowContainer<WindowContainer> {
            return;
        }

        // TODO(xutan): Removed type check after stack and task is merged.
        // Before the real merge of stack and task, we need to avoid saving state of stacks. Once
        // the merge is finished we can just pass DisplayContent because both windowing mode and
        // bounds are set in the merged task.
        if (oldParent instanceof ActivityStack) {
        if (isLeafTask()) {
            // This task is going away, so save the last state if necessary.
            saveLaunchingStateIfNeeded(((WindowContainer) oldParent).getDisplayContent());
        }