Avoid unnecessary work.
If the pending queue is empty, then we don't need to do all the work of determining job assignments. Bug: 141645789 Test: Android builds Change-Id: I3dfad0ea128580ba7e924b332464b807eb2c403f
This commit is contained in:
@@ -606,6 +606,11 @@ class JobConcurrencyManager {
|
||||
Slog.d(TAG, printPendingQueueLocked());
|
||||
}
|
||||
|
||||
if (mService.getPendingJobQueue().size() == 0) {
|
||||
// Nothing to do.
|
||||
return;
|
||||
}
|
||||
|
||||
final PendingJobQueue pendingJobQueue = mService.getPendingJobQueue();
|
||||
final List<JobServiceContext> activeServices = mActiveServices;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user