Merge "DO NOT MERGE: use legacy way to get tcp packet count" into pi-dev
am: 15cbfefb03 Change-Id: I7d0498bece672a482e2204424ca5d7780a6c7dc8
This commit is contained in:
@@ -940,8 +940,14 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getIfaceStats(String iface, int type) {
|
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
|
@Override
|
||||||
public long getTotalStats(int type) {
|
public long getTotalStats(int type) {
|
||||||
|
|||||||
Reference in New Issue
Block a user