Merge "BgDexopt: Reschedule job on timeout"

This commit is contained in:
Andreas Gampe
2018-03-28 02:53:57 +00:00
committed by Gerrit Code Review

View File

@@ -463,10 +463,17 @@ public class BackgroundDexOptService extends JobService {
if (params.getJobId() == JOB_POST_BOOT_UPDATE) { if (params.getJobId() == JOB_POST_BOOT_UPDATE) {
mAbortPostBootUpdate.set(true); mAbortPostBootUpdate.set(true);
// Do not reschedule.
// TODO: We should reschedule if we didn't process all apps, yet.
return false;
} else { } else {
mAbortIdleOptimization.set(true); 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) { private void notifyPinService(ArraySet<String> updatedPackages) {