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

Commit a997289c authored by Junyu Lai's avatar Junyu Lai Committed by Automerger Merge Worker
Browse files

Merge "NetworkStats: Avoid Division By 0" am: e2227883 am: 53877130 am: 6dd8eab0

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1810678

Change-Id: I0b98a671be9c649f8e0d0655e2820b2430d0a3ef
parents 7f2ec712 6dd8eab0
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();