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

Commit cb071433 authored by Hugo Benichi's avatar Hugo Benichi Committed by Gerrit Code Review
Browse files

Merge "Fix NPE in NetworkMetrics"

parents e7d04d72 e73486bf
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -98,6 +98,9 @@ public class NetworkMetrics {


    /** Accumulate a single netd sock_diag poll result reported by netd. */
    /** Accumulate a single netd sock_diag poll result reported by netd. */
    public void addTcpStatsResult(int sent, int lost, int rttUs, int sentAckDiffMs) {
    public void addTcpStatsResult(int sent, int lost, int rttUs, int sentAckDiffMs) {
        if (pendingSummary == null) {
            pendingSummary = new Summary(netId, transports);
        }
        pendingSummary.tcpLossRate.count(lost, sent);
        pendingSummary.tcpLossRate.count(lost, sent);
        pendingSummary.roundTripTimeUs.count(rttUs);
        pendingSummary.roundTripTimeUs.count(rttUs);
        pendingSummary.sentAckTimeDiffenceMs.count(sentAckDiffMs);
        pendingSummary.sentAckTimeDiffenceMs.count(sentAckDiffMs);