Watch network subtype, tethering teardown, empty.
Watch for changes to telephony network subtype, and update iface mapping to persist stats under correct type. Update network stats before removing tethering NAT rules. Skip recording that would create empty historical buckets. Query UID stats before iface stats to always skew positive when counters are actively rolling forward. Bug: 5360042, 5359860, 5335674, 5334448 Change-Id: I8aa37b568e8ffb70647218aa1aff5195d3e44d5a
This commit is contained in:
@@ -270,6 +270,11 @@ public class NetworkStatsHistory implements Parcelable {
|
||||
|| entry.operations < 0) {
|
||||
throw new IllegalArgumentException("tried recording negative data");
|
||||
}
|
||||
if (entry.rxBytes == 0 && entry.rxPackets == 0 && entry.txBytes == 0 && entry.txPackets == 0
|
||||
&& entry.operations == 0) {
|
||||
// nothing to record; skip
|
||||
return;
|
||||
}
|
||||
|
||||
// create any buckets needed by this range
|
||||
ensureBuckets(start, end);
|
||||
|
||||
Reference in New Issue
Block a user