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

Commit 49533406 authored by Kweku Adams's avatar Kweku Adams
Browse files

Recalculate network estimate after work is completed.

Don't recalculate the network byte numbers when a JobWorkItem has been
dequeued since the work still needs to be done. Instead, wait until the
work has been marked completed to recalculate the network byte numbers.

Bug: 255828754
Test: N/A
Change-Id: I0deb5d35293a8780329696d2c467270e59d32e05
parent d91cb407
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -762,7 +762,6 @@ public final class JobStatus {
                executingWork.add(work);
                work.bumpDeliveryCount();
            }
            updateNetworkBytesLocked();
            return work;
        }
        return null;
@@ -790,6 +789,7 @@ public final class JobStatus {
                if (work.getWorkId() == workId) {
                    executingWork.remove(i);
                    ungrantWorkItem(work);
                    updateNetworkBytesLocked();
                    return true;
                }
            }