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

Commit 6b220343 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Let's not divide by zero."

parents e6bb3818 f46dc156
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1722,7 +1722,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
                final long totalBytes = getTotalBytes(
                        NetworkTemplate.buildTemplateMobileAll(state.subscriberId), start, end);
                final long remainingBytes = limitBytes - totalBytes;
                final long remainingDays = Math.min(1, (end - currentTimeMillis())
                final long remainingDays = Math.max(1, (end - currentTimeMillis())
                        / TimeUnit.DAYS.toMillis(1));
                if (remainingBytes > 0) {
                    quotaBytes = (remainingBytes / remainingDays) / 10;