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

Commit f6654f0e authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Replace .toList() with .collect()" into main

parents 8fb4be61 7cf6d7cb
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -89,6 +89,7 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Semaphore;
import java.util.function.Consumer;
import java.util.stream.Collectors;

import javax.annotation.Nullable;

@@ -1030,9 +1031,10 @@ public abstract class AbstractActionHandler<T extends FragmentActivity & CommonA
                Collection<RootInfo> rootList = new ArrayList<>();
                if (stack.isRecents()) {
                    // TODO(b:381346575): Pass roots based on user selection.
                    rootList.addAll(mProviders.getMatchingRootsBlocking(mState).stream().filter(
                            r -> r.supportsSearch() && r.authority != null
                                    && r.rootId != null).toList());
                    rootList.addAll(mProviders.getMatchingRootsBlocking(mState).stream()
                            .filter(r -> r.supportsSearch() && r.authority != null
                                    && r.rootId != null)
                            .collect(Collectors.toList()));
                } else {
                    rootList.add(root);
                }