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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user