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

Commit 89bb17f6 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Store requested priority." into tm-dev am: 35c66c8d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17158685

Change-Id: Iacb9e60ae8e1f1c8a5322b213b532f90c113ebe5
parents 4c59ad85 35c66c8d
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());
    }

    /**