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

Commit 298395dd authored by tanxiaoyan's avatar tanxiaoyan
Browse files

Make a copy of the TaskFragmentContainer list.



Update all TaskFragments in the Task. Make a copy of the list since some may be
removed on updating.

Bug:363313091

Change-Id: Ie087ce7f19e43ff1d70b5792841cc6ae378183d9
Signed-off-by: default avatartanxiaoyan <tanxiaoyan@xiaomi.com>
parent 3dbf4cab
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -852,7 +852,8 @@ public class SplitController implements JetpackTaskFragmentOrganizer.TaskFragmen
            @NonNull TaskContainer taskContainer) {
        // Update all TaskFragments in the Task. Make a copy of the list since some may be
        // removed on updating.
        final List<TaskFragmentContainer> containers = taskContainer.getTaskFragmentContainers();
        final List<TaskFragmentContainer> containers
                = new ArrayList<>(taskContainer.getTaskFragmentContainers());
        for (int i = containers.size() - 1; i >= 0; i--) {
            final TaskFragmentContainer container = containers.get(i);
            // Wait until onTaskFragmentAppeared to update new container.