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

Commit 7cac8493 authored by Louis Chang's avatar Louis Chang
Browse files

Keep top fullscreen tasks on top when dismiss splits

A fullscreen task was added on top and exit split-screen mode
while an activity started, but the activity didn't be resumed
because the belonging task was no longer on top after split-screen
tasks were reparented to top.

Bug: 161170237
Test: start emergency dialer when split-screen activated

Change-Id: I44dbe0d2966dd831264ca366f5889d6429d78972
parent bde58d21
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -1324,7 +1324,13 @@ final class TaskDisplayArea extends DisplayArea<Task> {
    }

    void onSplitScreenModeDismissed() {
        onSplitScreenModeDismissed(null /* toTop */);
        // The focused task could be a non-resizeable fullscreen root task that is on top of the
        // other split-screen tasks, therefore had to dismiss split-screen, make sure the current
        // focused root task can still be on top after dismissal
        final Task rootTask = getFocusedStack();
        final Task toTop =
                rootTask != null && !rootTask.inSplitScreenWindowingMode() ? rootTask : null;
        onSplitScreenModeDismissed(toTop);
    }

    void onSplitScreenModeDismissed(Task toTop) {