Merge "Replace HashMap with ArrayMap for better performance" into main

This commit is contained in:
Jun Lan
2023-11-06 05:31:07 +00:00
committed by Android (Google) Code Review
6 changed files with 14 additions and 16 deletions

View File

@@ -34,7 +34,6 @@ import com.android.settings.Utils;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -293,7 +292,7 @@ public class DataProcessManager {
Log.d(TAG, "there is no work profile");
}
final Map<Long, UsageEvents> usageEventsMap = new HashMap<>();
final Map<Long, UsageEvents> usageEventsMap = new ArrayMap<>();
usageEventsMap.put(Long.valueOf(currentUserId), usageEventsForCurrentUser);
if (usageEventsForWorkProfile != null) {
Log.d(TAG, "usageEventsForWorkProfile is null");