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

Commit be242f46 authored by Chris Li's avatar Chris Li
Browse files

Active container should contain non-finishing activity

Without this cl, the app will crash if a TaskFragment is closing when
the new top TaskFragment doesn't contain any non-finishing activity
(which should be closed later as well).

Before, when #cleanupContainer(), we will also update the new top active
container, but we didn't check if it contain any non finishing activity.

Fix: 212355346
Test: test with Settings with three finger click
Change-Id: I26538b85f1cf8e618a3f1ee6abada5a9f77f2b16
parent 091aba97
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -346,7 +346,7 @@ public class SplitController implements JetpackTaskFragmentOrganizer.TaskFragmen
    TaskFragmentContainer getTopActiveContainer() {
        for (int i = mContainers.size() - 1; i >= 0; i--) {
            TaskFragmentContainer container = mContainers.get(i);
            if (!container.isFinished()) {
            if (!container.isFinished() && container.getTopNonFinishingActivity() != null) {
                return container;
            }
        }