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

Commit 8edab3cc 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 1ab40499 3b4afb95
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -180,7 +180,7 @@ public class EventManager {
            }
        }

        private final List<Event> mEvents = Collections.synchronizedList(new LinkedList<>());
        private final List<Event> mEvents = Collections.synchronizedList(new ArrayList<>());
        private final Loggable mRecordEntry;

        public EventRecord(Loggable recordEntry) {
@@ -197,7 +197,7 @@ public class EventManager {
        }

        public List<Event> getEvents() {
            return new LinkedList<>(mEvents);
            return new ArrayList<>(mEvents);
        }

        public List<EventTiming> extractEventTimings() {
@@ -205,7 +205,7 @@ public class EventManager {
                return Collections.emptyList();
            }

            LinkedList<EventTiming> result = new LinkedList<>();
            ArrayList<EventTiming> result = new ArrayList<>();
            Map<String, PendingResponse> pendingResponses = new HashMap<>();
            synchronized (mEvents) {
                for (Event event : mEvents) {
+1 −1
Original line number Diff line number Diff line
@@ -359,7 +359,7 @@ public class ParcelableCallAnalytics implements Parcelable {
        eventTimings = new ArrayList<>();
        in.readTypedList(eventTimings, EventTiming.CREATOR);
        isVideoCall = readByteAsBoolean(in);
        videoEvents = new LinkedList<>();
        videoEvents = new ArrayList<>();
        in.readTypedList(videoEvents, VideoEvent.CREATOR);
        callSource = in.readInt();
    }