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

Commit d3f5c435 authored by Nikolas Havrikov's avatar Nikolas Havrikov
Browse files

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
parent dbb79760
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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")
+2 −2
Original line number Diff line number Diff line
@@ -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}.