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

Commit c0bb245b authored by Devi Sandeep Endluri V V's avatar Devi Sandeep Endluri V V Committed by Linux Build Service Account
Browse files

Tethering: call getTetherStats before RecordingSnaphot

getTetherStats should be called before recording
xtSnapshot and devSnapshot, to add tethered data
stats to total Network Stats

Change-Id: I81b77e6dbffb78356bf68496bff412ef1a0284dd
CRs-Fixed: 1047506
parent 9bb392c0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1015,6 +1015,7 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
        final NetworkStats xtSnapshot = mNetworkManager.getNetworkStatsSummaryXt();
        final NetworkStats devSnapshot = mNetworkManager.getNetworkStatsSummaryDev();

        NetPluginDelegate.getTetherStats(uidSnapshot, xtSnapshot, devSnapshot);

        // For xt/dev, we pass a null VPN array because usage is aggregated by UID, so VPN traffic
        // can't be reattributed to responsible apps.
@@ -1022,7 +1023,6 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
                devSnapshot, mActiveIfaces, null /* vpnArray */, currentTime);
        mXtRecorder.recordSnapshotLocked(
                xtSnapshot, mActiveIfaces, null /* vpnArray */, currentTime);
        NetPluginDelegate.getTetherStats(uidSnapshot, xtSnapshot, devSnapshot);

        // For per-UID stats, pass the VPN info so VPN traffic is reattributed to responsible apps.
        VpnInfo[] vpnArray = mConnManager.getAllVpnInfo();