Poll UID stats during iface changes, enforce idx.
When ifaces change, poll UID stats without persisting, since they depend on knowing active iface to store correctly. Log dropped UID stats when iface is unknown. Switch to using flags when calling performPoll(). Enforce that "idx" values are consistent from xt_qtaguid. Transition to using Log.wtf() for important checks, mostly around file I/O, kernel stats parsing, and kernel module control. Increase stats persist threshold to 2MB to reduce churn. Bug: 5269476, 5270106 Change-Id: I721215bfb65127f95775c71cf135e907cd567e92
This commit is contained in:
@@ -102,6 +102,21 @@ public class NetworkStats implements Parcelable {
|
||||
this.txPackets = txPackets;
|
||||
this.operations = operations;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuilder builder = new StringBuilder();
|
||||
builder.append("iface=").append(iface);
|
||||
builder.append(" uid=").append(uid);
|
||||
builder.append(" set=").append(setToString(set));
|
||||
builder.append(" tag=").append(tagToString(tag));
|
||||
builder.append(" rxBytes=").append(rxBytes);
|
||||
builder.append(" rxPackets=").append(rxPackets);
|
||||
builder.append(" txBytes=").append(txBytes);
|
||||
builder.append(" txPackets=").append(txPackets);
|
||||
builder.append(" operations=").append(operations);
|
||||
return builder.toString();
|
||||
}
|
||||
}
|
||||
|
||||
public NetworkStats(long elapsedRealtime, int initialSize) {
|
||||
|
||||
Reference in New Issue
Block a user