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: I56d68da6531c7266a8592fb80b94877da9eb5fb4
This commit is contained in:
Nikolas Havrikov
2022-02-23 16:19:30 +01:00
parent dbb7976008
commit d3f5c4352d
2 changed files with 3 additions and 4 deletions

View File

@@ -60,7 +60,6 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@@ -484,7 +483,7 @@ public final class TvInputManager {
private final Object mLock = new Object();
// @GuardedBy("mLock")
private final List<TvInputCallbackRecord> mCallbackRecords = new LinkedList<>();
private final List<TvInputCallbackRecord> mCallbackRecords = new ArrayList<>();
// A mapping from TV input ID to the state of corresponding input.
// @GuardedBy("mLock")

View File

@@ -51,8 +51,8 @@ import com.android.internal.util.Preconditions;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.Executor;
@@ -293,7 +293,7 @@ public final class TvInteractiveAppManager {
new SparseArray<>();
// @GuardedBy("mLock")
private final List<TvInteractiveAppCallbackRecord> mCallbackRecords = new LinkedList<>();
private final List<TvInteractiveAppCallbackRecord> mCallbackRecords = new ArrayList<>();
// A sequence number for the next session to be created. Should be protected by a lock
// {@code mSessionCallbackRecordMap}.