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

Commit 6cca414d authored by Adam Lesinski's avatar Adam Lesinski
Browse files

BatteryStats: Fix issue where network traffic accounting might be lost

Both bytes transmitted and received must be 0 if we are to short circuit and
ignore the UID's network delta.

Change-Id: Ia69f605c7d5954b8f2c3671bab596dc9925f1d02
parent ab9a9b09
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -8056,7 +8056,8 @@ public final class BatteryStatsImpl extends BatteryStats {
                            + " txPackets=" + entry.txPackets);
                }

                if (entry.rxBytes == 0 || entry.txBytes == 0) {
                if (entry.rxBytes == 0 && entry.txBytes == 0) {
                    // Skip the lookup below since there is no work to do.
                    continue;
                }