Replace LinkedList by a more performant collection
This is a semi-automatic change.
See https://errorprone.info/bugpattern/JdkObsolete for the rationale.
Test: make
Bug: 221046110
Change-Id: I1ed1116d032e59b229be68a98f31292d972b012b
diff --git a/core/java/android/service/autofill/FillContext.java b/core/java/android/service/autofill/FillContext.java
index 8331550..cc1b6cd 100644
--- a/core/java/android/service/autofill/FillContext.java
+++ b/core/java/android/service/autofill/FillContext.java
@@ -32,7 +32,7 @@
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
@@ -95,7 +95,7 @@
* @hide
*/
@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];
// Indexes of foundNodes that are not found yet