DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master

Bug: 120502534
Change-Id: Idc8bfb6d97a869b76cfb87ca1a494201baf9e8bd
This commit is contained in:
Xin Li
2018-12-11 14:13:44 -08:00
2 changed files with 15 additions and 1 deletions

View File

@@ -955,7 +955,13 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
@Override
public long getIfaceStats(String iface, int type) {
return nativeGetIfaceStat(iface, type, checkBpfStatsEnable());
// 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());
}
}
@Override