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

Commit 65d7ab9d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Replace LinkedList by a more performant collection"

parents 77d46742 8c055784
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -32,7 +32,7 @@ import android.view.autofill.AutofillId;


import com.android.internal.util.DataClass;
import com.android.internal.util.DataClass;


import java.util.LinkedList;
import java.util.ArrayDeque;


/**
/**
 * This class represents a context for each fill request made via {@link
 * This class represents a context for each fill request made via {@link
@@ -95,7 +95,7 @@ public final class FillContext implements Parcelable {
     * @hide
     * @hide
     */
     */
    @NonNull public ViewNode[] findViewNodesByAutofillIds(@NonNull AutofillId[] ids) {
    @NonNull public ViewNode[] findViewNodesByAutofillIds(@NonNull AutofillId[] ids) {
        final LinkedList<ViewNode> nodesToProcess = new LinkedList<>();
        final ArrayDeque<ViewNode> nodesToProcess = new ArrayDeque<>();
        final ViewNode[] foundNodes = new AssistStructure.ViewNode[ids.length];
        final ViewNode[] foundNodes = new AssistStructure.ViewNode[ids.length];


        // Indexes of foundNodes that are not found yet
        // Indexes of foundNodes that are not found yet