BgDexopt: Reschedule job on timeout

When the background dexopt job times out, tell the scheduler to
reschedule it, as we have more work to do.

Bug: 76425903
Test: m
Test: manual
Change-Id: Ibbdb979bceb1ff0a25f8aed2b3cc26a7f30057e2
This commit is contained in:
Andreas Gampe
2018-03-27 15:04:19 -07:00
parent a36ada4b95
commit c157be081e

View File

@@ -463,10 +463,17 @@ public class BackgroundDexOptService extends JobService {
if (params.getJobId() == JOB_POST_BOOT_UPDATE) {
mAbortPostBootUpdate.set(true);
// Do not reschedule.
// TODO: We should reschedule if we didn't process all apps, yet.
return false;
} else {
mAbortIdleOptimization.set(true);
// Reschedule the run.
// TODO: Should this be dependent on the stop reason?
return true;
}
return false;
}
private void notifyPinService(ArraySet<String> updatedPackages) {