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

Commit c98d5a9d authored by Aaron Huang's avatar Aaron Huang Committed by Android (Google) Code Review
Browse files

Merge "NetworkStats: Avoid Division By 0" into sc-qpr1-dev

parents f6519efe 84fea648
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -290,7 +290,8 @@ public class NetworkStatsCollection implements FileRotator.Reader, FileRotator.W
                combined.getValues(augmentStart, augmentEnd, entry);
            }

            final long rawBytes = entry.rxBytes + entry.txBytes;
            final long rawBytes = (entry.rxBytes + entry.txBytes) == 0 ? 1 :
                    (entry.rxBytes + entry.txBytes);
            final long rawRxBytes = entry.rxBytes == 0 ? 1 : entry.rxBytes;
            final long rawTxBytes = entry.txBytes == 0 ? 1 : entry.txBytes;
            final long targetBytes = augmentPlan.getDataUsageBytes();