Merge "Fix NullPointerException happens in dumpCheckin"
This commit is contained in:
@@ -206,6 +206,7 @@ public class NetworkIdentitySet extends HashSet<NetworkIdentity> {
|
||||
public static int compare(@NonNull NetworkIdentitySet left, @NonNull NetworkIdentitySet right) {
|
||||
Objects.requireNonNull(left);
|
||||
Objects.requireNonNull(right);
|
||||
if (left.isEmpty() && right.isEmpty()) return 0;
|
||||
if (left.isEmpty()) return -1;
|
||||
if (right.isEmpty()) return 1;
|
||||
|
||||
|
||||
@@ -776,7 +776,7 @@ public class NetworkStatsCollection implements FileRotator.Reader, FileRotator.W
|
||||
if (!templateMatches(groupTemplate, key.ident)) continue;
|
||||
if (key.set >= NetworkStats.SET_DEBUG_START) continue;
|
||||
|
||||
final Key groupKey = new Key(null, key.uid, key.set, key.tag);
|
||||
final Key groupKey = new Key(new NetworkIdentitySet(), key.uid, key.set, key.tag);
|
||||
NetworkStatsHistory groupHistory = grouped.get(groupKey);
|
||||
if (groupHistory == null) {
|
||||
groupHistory = new NetworkStatsHistory(value.getBucketDuration());
|
||||
|
||||
Reference in New Issue
Block a user