Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2deb1e87 authored by junyulai's avatar junyulai
Browse files

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 a5c3fb10 which is the short term
solution in P.

Bug: 110443385
Test: atest FrameworksNetTests
Change-Id: Ia09f908edbf194b9aa873a3bdd5aee7b6fcb16bc
parent ffb51ba0
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -955,14 +955,8 @@ 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());
    }
    }

    @Override
    public long getTotalStats(int type) {