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

Commit ba5f1299 authored by Chris Tate's avatar Chris Tate Committed by Android (Google) Code Review
Browse files

Merge "Remember to prepare() jobs when synthesizing them"

parents 908309fe c4c0545e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@ public final class JobStore {
    public void getRtcCorrectedJobsLocked(final ArrayList<JobStatus> toAdd,
            final ArrayList<JobStatus> toRemove) {
        final long elapsedNow = sElapsedRealtimeClock.millis();
        final IActivityManager am = ActivityManager.getService();

        // Find the jobs that need to be fixed up, collecting them for post-iteration
        // replacement with their new versions
@@ -182,9 +183,11 @@ public final class JobStore {
            if (utcTimes != null) {
                Pair<Long, Long> elapsedRuntimes =
                        convertRtcBoundsToElapsed(utcTimes, elapsedNow);
                toAdd.add(new JobStatus(job, job.getBaseHeartbeat(),
                JobStatus newJob = new JobStatus(job, job.getBaseHeartbeat(),
                        elapsedRuntimes.first, elapsedRuntimes.second,
                        0, job.getLastSuccessfulRunTime(), job.getLastFailedRunTime()));
                        0, job.getLastSuccessfulRunTime(), job.getLastFailedRunTime());
                newJob.prepareLocked(am);
                toAdd.add(newJob);
                toRemove.add(job);
            }
        });