Remove cancelled job from evaluation list.

The changedJobList is used as the list of jobs we should evaluate to
either add to the pending list or stop from execution. Thankfully,
cancelled jobs are never considered eligible to run, but removing them
from the evaluation list to reduce unnecessary work.

Bug: 141645789
Bug: 228334264
Test: N/A
Change-Id: I6017afbb79a3e3871273cdc0a1faa97344cfcabf
This commit is contained in:
Kweku Adams
2022-04-08 21:06:35 +00:00
parent e3c41047b4
commit be7816af8f

View File

@@ -1387,6 +1387,7 @@ public class JobSchedulerService extends com.android.server.SystemService
if (mPendingJobQueue.remove(cancelled)) {
mJobPackageTracker.noteNonpending(cancelled);
}
mChangedJobList.remove(cancelled);
// Cancel if running.
mConcurrencyManager.stopJobOnServiceContextLocked(
cancelled, reason, internalReasonCode, debugReason);