Replace HashMap with ArrayMap for better performance
Reason: https://screenshot.googleplex.com/BdHiua8gU8aGUmR Test: manual Bug: 308913393 Fix: 308913393 Change-Id: Iea085006ffe6ca48fe547319b9f0f4d20aa78bda
This commit is contained in:
@@ -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;
|
||||
@@ -295,7 +294,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");
|
||||
|
Reference in New Issue
Block a user