From 2deb1e87844863624ee3b4134fc109251d7c0c47 Mon Sep 17 00:00:00 2001 From: junyulai Date: Wed, 9 Jan 2019 10:23:20 +0800 Subject: DO NOT MERGE: Revert: use legacy way to get tcp packet count In Q, legacy way to get tcp packet count is not planned to be supported. Users who use this unsupported API e.g., data stall detection are also planned to be removed. Thus, this change reverts a5c3fb10f2576 which is the short term solution in P. Bug: 110443385 Test: atest FrameworksNetTests Change-Id: Ia09f908edbf194b9aa873a3bdd5aee7b6fcb16bc --- .../core/java/com/android/server/net/NetworkStatsService.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/services/core/java/com/android/server/net/NetworkStatsService.java b/services/core/java/com/android/server/net/NetworkStatsService.java index 82371855bdda..383e1e0288ca 100644 --- a/services/core/java/com/android/server/net/NetworkStatsService.java +++ b/services/core/java/com/android/server/net/NetworkStatsService.java @@ -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 -- cgit v1.2.3-59-g8ed1b