Merge "DO NOT MERGE: Revert: use legacy way to get tcp packet count"

This commit is contained in:
Treehugger Robot
2019-01-09 05:10:05 +00:00
committed by Gerrit Code Review

View File

@@ -955,13 +955,7 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
@Override
public long getIfaceStats(String iface, int type) {
// eBPF code doesn't provide per-interface TCP counters. Use xt_qtaguid for now.
// TODO: delete getMobileTcp(Rx|Tx)Packets entirely. See b/110443385 .
if (type == TYPE_TCP_TX_PACKETS || type == TYPE_TCP_RX_PACKETS) {
return nativeGetIfaceStat(iface, type, false);
} else {
return nativeGetIfaceStat(iface, type, checkBpfStatsEnable());
}
return nativeGetIfaceStat(iface, type, checkBpfStatsEnable());
}
@Override