Merge "Replace LinkedList by a more performant collection"
This commit is contained in:
committed by
Android (Google) Code Review
commit
8edab3cc26
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user