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

Commit 35c66c8d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Store requested priority." into tm-dev

parents 82b28764 f74a0c0f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -548,7 +548,7 @@ public final class JobStore {
            out.attribute(null, "sourceUserId", String.valueOf(jobStatus.getSourceUserId()));
            out.attribute(null, "uid", Integer.toString(jobStatus.getUid()));
            out.attribute(null, "bias", String.valueOf(jobStatus.getBias()));
            out.attribute(null, "priority", String.valueOf(jobStatus.getEffectivePriority()));
            out.attribute(null, "priority", String.valueOf(jobStatus.getJob().getPriority()));
            out.attribute(null, "flags", String.valueOf(jobStatus.getFlags()));
            if (jobStatus.getInternalFlags() != 0) {
                out.attribute(null, "internalFlags", String.valueOf(jobStatus.getInternalFlags()));
+5 −4
Original line number Diff line number Diff line
@@ -330,11 +330,12 @@ public class JobStoreTest {

    @Test
    public void testPriorityPersisted() throws Exception {
        final JobInfo.Builder b = new Builder(92, mComponent)
        final JobInfo job = new Builder(92, mComponent)
                .setOverrideDeadline(5000)
                .setPriority(JobInfo.PRIORITY_MIN)
                .setPersisted(true);
        final JobStatus js = JobStatus.createFromJobInfo(b.build(), SOME_UID, null, -1, null);
                .setPersisted(true)
                .build();
        final JobStatus js = JobStatus.createFromJobInfo(job, SOME_UID, null, -1, null);
        mTaskStoreUnderTest.add(js);
        waitForPendingIo();

@@ -342,7 +343,7 @@ public class JobStoreTest {
        mTaskStoreUnderTest.readJobMapFromDisk(jobStatusSet, true);
        final JobStatus loaded = jobStatusSet.getAllJobs().iterator().next();
        assertEquals("Priority not correctly persisted.",
                JobInfo.PRIORITY_MIN, loaded.getEffectivePriority());
                JobInfo.PRIORITY_MIN, job.getPriority());
    }

    /**