Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6da7d879 authored by Andreas Gampe's avatar Andreas Gampe
Browse files

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.

(cherry picked from commit c157be08)

Bug: 76425903
Test: m
Test: manual
Merged-In: Ibbdb979bceb1ff0a25f8aed2b3cc26a7f30057e2
Change-Id: Ibbdb979bceb1ff0a25f8aed2b3cc26a7f30057e2
parent 1c73370d
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -472,10 +472,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) {