Home
last modified time | relevance | path

Searched refs:JobStatus (Results 1 – 25 of 33) sorted by relevance

12

/frameworks/base/services/tests/servicestests/src/com/android/server/job/
DJobStoreTest.java36 import com.android.server.job.controllers.JobStatus;
119 final JobStatus ts = JobStatus.createFromJobInfo(task, SOME_UID, null, -1, null); in testMaybeWriteStatusToDisk()
120 ts.addInternalFlags(JobStatus.INTERNAL_FLAG_HAS_FOREGROUND_EXEMPTION); in testMaybeWriteStatusToDisk()
129 final JobStatus loadedTaskStatus = jobStatusSet.getAllJobs().get(0); in testMaybeWriteStatusToDisk()
133 assertEquals(JobStatus.INTERNAL_FLAG_HAS_FOREGROUND_EXEMPTION, in testMaybeWriteStatusToDisk()
156 final JobStatus taskStatus1 = JobStatus.createFromJobInfo(task1, SOME_UID, null, -1, null); in testWritingTwoFilesToDisk()
157 final JobStatus taskStatus2 = JobStatus.createFromJobInfo(task2, SOME_UID, null, -1, null); in testWritingTwoFilesToDisk()
165 Iterator<JobStatus> it = jobStatusSet.getAllJobs().iterator(); in testWritingTwoFilesToDisk()
166 JobStatus loaded1 = it.next(); in testWritingTwoFilesToDisk()
167 JobStatus loaded2 = it.next(); in testWritingTwoFilesToDisk()
[all …]
DJobSetTest.java42 import com.android.server.job.controllers.JobStatus;
76 private JobStatus getJobStatusWithCallinUid(int jobId, int callingUid) { in getJobStatusWithCallinUid()
81 return JobStatus.createFromJobInfo(jobInfo, callingUid, mContext.getPackageName(), in getJobStatusWithCallinUid()
89 final JobStatus testJob1 = getJobStatusWithCallinUid(1, callingUid1); in testBothMapsHaveSameJobs()
90 final JobStatus testJob2 = getJobStatusWithCallinUid(2, callingUid2); in testBothMapsHaveSameJobs()
107 private static void assertHaveSameJobs(SparseArray<ArraySet<JobStatus>> map1, in assertHaveSameJobs()
108 SparseArray<ArraySet<JobStatus>> map2) { in assertHaveSameJobs()
109 final ArraySet<JobStatus> set1 = new ArraySet<>(); in assertHaveSameJobs()
110 final ArraySet<JobStatus> set2 = new ArraySet<>(); in assertHaveSameJobs()
113 final ArraySet<JobStatus> jobs = map1.valueAt(i); in assertHaveSameJobs()
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/controllers/
DTimeControllerTest.java138 private JobStatus createJobStatus(String testTag, JobInfo.Builder job) { in createJobStatus()
140 return JobStatus.createFromJobInfo( in createJobStatus()
146 JobStatus delaySatisfied = createJobStatus( in testMaybeStartTrackingJobLocked_AlreadySatisfied()
149 JobStatus deadlineSatisfied = createJobStatus( in testMaybeStartTrackingJobLocked_AlreadySatisfied()
171 JobStatus jobLatest = createJobStatus("testMaybeStartTrackingJobLocked_DelayInOrder", in runTestMaybeStartTrackingJobLocked_DelayInOrder()
173 JobStatus jobMiddle = createJobStatus("testMaybeStartTrackingJobLocked_DelayInOrder", in runTestMaybeStartTrackingJobLocked_DelayInOrder()
175 JobStatus jobEarliest = createJobStatus("testMaybeStartTrackingJobLocked_DelayInOrder", in runTestMaybeStartTrackingJobLocked_DelayInOrder()
196 JobStatus jobLatest = createJobStatus("testMaybeStartTrackingJobLocked_DelayInOrder", in testMaybeStartTrackingJobLocked_DelayInOrder_SomeNotReady()
198 JobStatus jobMiddle = createJobStatus("testMaybeStartTrackingJobLocked_DelayInOrder", in testMaybeStartTrackingJobLocked_DelayInOrder_SomeNotReady()
200 JobStatus jobEarliest = createJobStatus("testMaybeStartTrackingJobLocked_DelayInOrder", in testMaybeStartTrackingJobLocked_DelayInOrder_SomeNotReady()
[all …]
DConnectivityControllerTest.java202 final JobStatus early = createJobStatus(job, now - 1000, now + 2000); in testCongestion()
203 final JobStatus late = createJobStatus(job, now - 2000, now + 1000); in testCongestion()
232 final JobStatus early = createJobStatus(job, now - 1000, now + 2000); in testRelaxed()
233 final JobStatus late = createJobStatus(job, now - 2000, now + 1000); in testRelaxed()
236 final JobStatus earlyPrefetch = createJobStatus(job, now - 1000, now + 2000); in testRelaxed()
237 final JobStatus latePrefetch = createJobStatus(job, now - 2000, now + 1000); in testRelaxed()
279 final JobStatus red = createJobStatus(createJob() in testUpdates()
282 final JobStatus blue = createJobStatus(createJob() in testUpdates()
295 assertFalse(red.isConstraintSatisfied(JobStatus.CONSTRAINT_CONNECTIVITY)); in testUpdates()
296 assertFalse(blue.isConstraintSatisfied(JobStatus.CONSTRAINT_CONNECTIVITY)); in testUpdates()
[all …]
DStateControllerTest.java81 public void maybeStartTrackingJobLocked(JobStatus jobStatus, JobStatus lastJob) { in maybeStartTrackingJobLocked()
84 public void maybeStopTrackingJobLocked(JobStatus jobStatus, JobStatus incomingJob, in maybeStopTrackingJobLocked()
89 Predicate<JobStatus> predicate) { in dumpControllerStateLocked()
93 Predicate<JobStatus> predicate) { in dumpControllerStateLocked()
135 private JobStatus createJobStatus(String testTag, int jobId) { in createJobStatus()
140 return JobStatus.createFromJobInfo( in createJobStatus()
146 JobStatus job = spy(createJobStatus("testWouldBeReadyWithConstraintLocked", 1)); in testWouldBeReadyWithConstraintLocked()
DJobStatusTest.java28 import static com.android.server.job.controllers.JobStatus.CONSTRAINT_BACKGROUND_NOT_RESTRICTED;
29 import static com.android.server.job.controllers.JobStatus.CONSTRAINT_BATTERY_NOT_LOW;
30 import static com.android.server.job.controllers.JobStatus.CONSTRAINT_CHARGING;
31 import static com.android.server.job.controllers.JobStatus.CONSTRAINT_CONNECTIVITY;
32 import static com.android.server.job.controllers.JobStatus.CONSTRAINT_CONTENT_TRIGGER;
33 import static com.android.server.job.controllers.JobStatus.CONSTRAINT_DEADLINE;
34 import static com.android.server.job.controllers.JobStatus.CONSTRAINT_DEVICE_NOT_DOZING;
35 import static com.android.server.job.controllers.JobStatus.CONSTRAINT_IDLE;
36 import static com.android.server.job.controllers.JobStatus.CONSTRAINT_STORAGE_NOT_LOW;
37 import static com.android.server.job.controllers.JobStatus.CONSTRAINT_TIMING_DELAY;
[all …]
DQuotaControllerTest.java274 private void setStandbyBucket(int bucketIndex, JobStatus... jobs) { in setStandbyBucket()
276 for (JobStatus job : jobs) { in setStandbyBucket()
284 private void trackJobs(JobStatus... jobs) { in trackJobs()
285 for (JobStatus job : jobs) { in trackJobs()
291 private JobStatus createJobStatus(String testTag, int jobId) { in createJobStatus()
298 private JobStatus createJobStatus(String testTag, String packageName, int callingUid, in createJobStatus()
300 JobStatus js = JobStatus.createFromJobInfo( in createJobStatus()
640 JobStatus jobStatus = createJobStatus("testUpdateExecutionStatsLocked_WithTimer", i); in testUpdateExecutionStatsLocked_WithTimer()
677 JobStatus jobStatus = createJobStatus("testUpdateExecutionStatsLocked_WithTimer", 0); in testUpdateExecutionStatsLocked_WithTimer()
1060 JobStatus job = createJobStatus("testGetMaxJobExecutionTimeLocked", 0); in testGetMaxJobExecutionTimeLocked()
[all …]
/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/controllers/
DStateController.java67 public abstract void maybeStartTrackingJobLocked(JobStatus jobStatus, JobStatus lastJob); in maybeStartTrackingJobLocked()
72 public void prepareForExecutionLocked(JobStatus jobStatus) { in prepareForExecutionLocked()
78 public abstract void maybeStopTrackingJobLocked(JobStatus jobStatus, JobStatus incomingJob, in maybeStopTrackingJobLocked()
84 public void rescheduleForFailureLocked(JobStatus newJob, JobStatus failureToReschedule) { in rescheduleForFailureLocked()
105 public void evaluateStateLocked(JobStatus jobStatus) { in evaluateStateLocked()
115 protected boolean wouldBeReadyWithConstraintLocked(JobStatus jobStatus, int constraint) { in wouldBeReadyWithConstraintLocked()
134 Predicate<JobStatus> predicate); in dumpControllerStateLocked()
136 Predicate<JobStatus> predicate); in dumpControllerStateLocked()
DConnectivityController.java80 private final SparseArray<ArraySet<JobStatus>> mTrackedJobs = new SparseArray<>();
87 private final SparseArray<ArraySet<JobStatus>> mRequestedWhitelistJobs = new SparseArray<>();
117 public void maybeStartTrackingJobLocked(JobStatus jobStatus, JobStatus lastJob) { in maybeStartTrackingJobLocked()
120 ArraySet<JobStatus> jobs = mTrackedJobs.get(jobStatus.getSourceUid()); in maybeStartTrackingJobLocked()
126 jobStatus.setTrackingController(JobStatus.TRACKING_CONNECTIVITY); in maybeStartTrackingJobLocked()
132 public void maybeStopTrackingJobLocked(JobStatus jobStatus, JobStatus incomingJob, in maybeStopTrackingJobLocked()
134 if (jobStatus.clearTrackingController(JobStatus.TRACKING_CONNECTIVITY)) { in maybeStopTrackingJobLocked()
135 ArraySet<JobStatus> jobs = mTrackedJobs.get(jobStatus.getSourceUid()); in maybeStopTrackingJobLocked()
144 public void startTrackingRestrictedJobLocked(JobStatus jobStatus) { in startTrackingRestrictedJobLocked()
153 public void stopTrackingRestrictedJobLocked(JobStatus jobStatus) { in stopTrackingRestrictedJobLocked()
[all …]
DIdleController.java47 final ArraySet<JobStatus> mTrackedTasks = new ArraySet<>();
59 public void maybeStartTrackingJobLocked(JobStatus taskStatus, JobStatus lastJob) { in maybeStartTrackingJobLocked()
62 taskStatus.setTrackingController(JobStatus.TRACKING_IDLE); in maybeStartTrackingJobLocked()
68 public void startTrackingRestrictedJobLocked(JobStatus jobStatus) { in startTrackingRestrictedJobLocked()
73 public void maybeStopTrackingJobLocked(JobStatus taskStatus, JobStatus incomingJob, in maybeStopTrackingJobLocked()
75 if (taskStatus.clearTrackingController(JobStatus.TRACKING_IDLE)) { in maybeStopTrackingJobLocked()
81 public void stopTrackingRestrictedJobLocked(JobStatus jobStatus) { in stopTrackingRestrictedJobLocked()
117 Predicate<JobStatus> predicate) { in dumpControllerStateLocked()
123 final JobStatus js = mTrackedTasks.valueAt(i); in dumpControllerStateLocked()
137 Predicate<JobStatus> predicate) { in dumpControllerStateLocked()
[all …]
DTimeController.java76 private final List<JobStatus> mTrackedJobs = new LinkedList<>();
99 public void maybeStartTrackingJobLocked(JobStatus job, JobStatus lastJob) { in maybeStartTrackingJobLocked()
120 ListIterator<JobStatus> it = mTrackedJobs.listIterator(mTrackedJobs.size()); in maybeStartTrackingJobLocked()
122 JobStatus ts = it.previous(); in maybeStartTrackingJobLocked()
134 job.setTrackingController(JobStatus.TRACKING_TIME); in maybeStartTrackingJobLocked()
140 && wouldBeReadyWithConstraintLocked(job, JobStatus.CONSTRAINT_TIMING_DELAY)) { in maybeStartTrackingJobLocked()
144 && wouldBeReadyWithConstraintLocked(job, JobStatus.CONSTRAINT_DEADLINE)) { in maybeStartTrackingJobLocked()
155 public void maybeStopTrackingJobLocked(JobStatus job, JobStatus incomingJob, in maybeStopTrackingJobLocked()
157 if (job.clearTrackingController(JobStatus.TRACKING_TIME)) { in maybeStopTrackingJobLocked()
166 public void evaluateStateLocked(JobStatus job) { in evaluateStateLocked()
[all …]
DStorageController.java47 private final ArraySet<JobStatus> mTrackedTasks = new ArraySet<JobStatus>();
62 public void maybeStartTrackingJobLocked(JobStatus taskStatus, JobStatus lastJob) { in maybeStartTrackingJobLocked()
65 taskStatus.setTrackingController(JobStatus.TRACKING_STORAGE); in maybeStartTrackingJobLocked()
71 public void maybeStopTrackingJobLocked(JobStatus taskStatus, JobStatus incomingJob, in maybeStopTrackingJobLocked()
73 if (taskStatus.clearTrackingController(JobStatus.TRACKING_STORAGE)) { in maybeStopTrackingJobLocked()
83 final JobStatus ts = mTrackedTasks.valueAt(i); in maybeReportNewStorageState()
156 Predicate<JobStatus> predicate) { in dumpControllerStateLocked()
162 final JobStatus js = mTrackedTasks.valueAt(i); in dumpControllerStateLocked()
176 Predicate<JobStatus> predicate) { in dumpControllerStateLocked()
186 final JobStatus js = mTrackedTasks.valueAt(i); in dumpControllerStateLocked()
DBatteryController.java51 private final ArraySet<JobStatus> mTrackedTasks = new ArraySet<>();
66 public void maybeStartTrackingJobLocked(JobStatus taskStatus, JobStatus lastJob) { in maybeStartTrackingJobLocked()
69 taskStatus.setTrackingController(JobStatus.TRACKING_BATTERY); in maybeStartTrackingJobLocked()
76 public void startTrackingRestrictedJobLocked(JobStatus jobStatus) { in startTrackingRestrictedJobLocked()
81 …public void maybeStopTrackingJobLocked(JobStatus taskStatus, JobStatus incomingJob, boolean forUpd… in maybeStopTrackingJobLocked()
82 if (taskStatus.clearTrackingController(JobStatus.TRACKING_BATTERY)) { in maybeStopTrackingJobLocked()
88 public void stopTrackingRestrictedJobLocked(JobStatus jobStatus) { in stopTrackingRestrictedJobLocked()
102 final JobStatus ts = mTrackedTasks.valueAt(i); in maybeReportNewChargingStateLocked()
240 Predicate<JobStatus> predicate) { in dumpControllerStateLocked()
251 final JobStatus js = mTrackedTasks.valueAt(i); in dumpControllerStateLocked()
[all …]
DBackgroundJobsController.java70 public void maybeStartTrackingJobLocked(JobStatus jobStatus, JobStatus lastJob) { in maybeStartTrackingJobLocked()
75 public void maybeStopTrackingJobLocked(JobStatus jobStatus, JobStatus incomingJob, in maybeStopTrackingJobLocked()
81 final Predicate<JobStatus> predicate) { in dumpControllerStateLocked()
105 & JobStatus.CONSTRAINT_BACKGROUND_NOT_RESTRICTED) != 0) { in dumpControllerStateLocked()
115 Predicate<JobStatus> predicate) { in dumpControllerStateLocked()
142 JobStatus.CONSTRAINT_BACKGROUND_NOT_RESTRICTED) != 0); in dumpControllerStateLocked()
186 boolean updateSingleJobRestrictionLocked(JobStatus jobStatus, int activeState) { in updateSingleJobRestrictionLocked()
191 (jobStatus.getInternalFlags() & JobStatus.INTERNAL_FLAG_HAS_FOREGROUND_EXEMPTION) in updateSingleJobRestrictionLocked()
208 private final class UpdateJobFunctor implements Consumer<JobStatus> {
219 public void accept(JobStatus jobStatus) { in accept()
DDeviceIdleJobsController.java64 private final ArraySet<JobStatus> mAllowInIdleJobs;
193 boolean isWhitelistedLocked(JobStatus job) { in isWhitelistedLocked()
201 boolean isTempWhitelistedLocked(JobStatus job) { in isTempWhitelistedLocked()
206 private boolean updateTaskStateLocked(JobStatus task) { in updateTaskStateLocked()
215 public void maybeStartTrackingJobLocked(JobStatus jobStatus, JobStatus lastJob) { in maybeStartTrackingJobLocked()
223 public void maybeStopTrackingJobLocked(JobStatus jobStatus, JobStatus incomingJob, in maybeStopTrackingJobLocked()
232 final Predicate<JobStatus> predicate) { in dumpControllerStateLocked()
244 & JobStatus.CONSTRAINT_DEVICE_NOT_DOZING) != 0 in dumpControllerStateLocked()
258 Predicate<JobStatus> predicate) { in dumpControllerStateLocked()
272 (jobStatus.satisfiedConstraints & JobStatus.CONSTRAINT_DEVICE_NOT_DOZING) != 0); in dumpControllerStateLocked()
[all …]
DContentObserverController.java61 final private ArraySet<JobStatus> mTrackedTasks = new ArraySet<>();
75 public void maybeStartTrackingJobLocked(JobStatus taskStatus, JobStatus lastJob) { in maybeStartTrackingJobLocked()
84 taskStatus.setTrackingController(JobStatus.TRACKING_CONTENT); in maybeStartTrackingJobLocked()
125 public void prepareForExecutionLocked(JobStatus taskStatus) { in prepareForExecutionLocked()
138 public void maybeStopTrackingJobLocked(JobStatus taskStatus, JobStatus incomingJob, in maybeStopTrackingJobLocked()
140 if (taskStatus.clearTrackingController(JobStatus.TRACKING_CONTENT)) { in maybeStopTrackingJobLocked()
179 public void rescheduleForFailureLocked(JobStatus newJob, JobStatus failureToReschedule) { in rescheduleForFailureLocked()
242 final JobStatus mJobStatus;
251 JobInstance(JobStatus jobStatus) { in JobInstance()
357 Predicate<JobStatus> predicate) { in dumpControllerStateLocked()
[all …]
DRestrictingController.java34 public abstract void startTrackingRestrictedJobLocked(JobStatus jobStatus); in startTrackingRestrictedJobLocked()
40 public abstract void stopTrackingRestrictedJobLocked(JobStatus jobStatus); in stopTrackingRestrictedJobLocked()
/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/
DJobStore.java49 import com.android.server.job.controllers.JobStatus;
178 public void getRtcCorrectedJobsLocked(final ArrayList<JobStatus> toAdd, in getRtcCorrectedJobsLocked()
179 final ArrayList<JobStatus> toRemove) { in getRtcCorrectedJobsLocked()
189 JobStatus newJob = new JobStatus(job, in getRtcCorrectedJobsLocked()
205 public boolean add(JobStatus jobStatus) { in add()
217 boolean containsJob(JobStatus jobStatus) { in containsJob()
239 public boolean remove(JobStatus jobStatus, boolean removeFromPersisted) { in remove()
271 public List<JobStatus> getJobsByUser(int userHandle) { in getJobsByUser()
279 public List<JobStatus> getJobsByUid(int uid) { in getJobsByUid()
288 public JobStatus getJobByUidAndJobId(int uid, int jobId) { in getJobByUidAndJobId()
[all …]
DJobSchedulerService.java100 import com.android.server.job.controllers.JobStatus;
275 final ArrayList<JobStatus> mPendingJobs = new ArrayList<>();
783 private static final Comparator<JobStatus> sPendingJobComparator = (o1, o2) -> {
902 List<JobStatus> jobsForUid;
1072 final JobStatus toCancel = mJobs.getJobByUidAndJobId(uId, job.getId());
1089 JobStatus jobStatus = JobStatus.createFromJobInfo(job, uId, packageName, userId, tag);
1160 List<JobStatus> jobs = mJobs.getJobsByUid(uid);
1163 JobStatus job = jobs.get(i);
1172 List<JobStatus> jobs = mJobs.getJobsByUid(uid);
1174 JobStatus job = jobs.get(i);
[all …]
DJobConcurrencyManager.java40 import com.android.server.job.controllers.JobStatus;
76 JobStatus[] mRecycledAssignContextIdToJobMap = new JobStatus[MAX_JOB_CONTEXTS_COUNT];
207 private boolean isFgJob(JobStatus job) { in isFgJob()
279 final List<JobStatus> pendingJobs = mService.mPendingJobs; in assignJobsToContextsInternalLocked()
286 JobStatus[] contextIdToJobMap = mRecycledAssignContextIdToJobMap; in assignJobsToContextsInternalLocked()
299 final JobStatus status = js.getRunningJobLocked(); in assignJobsToContextsInternalLocked()
314 final JobStatus pending = pendingJobs.get(i); in assignJobsToContextsInternalLocked()
331 final JobStatus nextPending = pendingJobs.get(i); in assignJobsToContextsInternalLocked()
348 JobStatus job = contextIdToJobMap[j]; in assignJobsToContextsInternalLocked()
405 JobStatus js = activeServices.get(i).getRunningJobLocked(); in assignJobsToContextsInternalLocked()
[all …]
DStateChangedListener.java21 import com.android.server.job.controllers.JobStatus;
43 public void onRunJobNow(JobStatus jobStatus); in onRunJobNow()
51 void onRestrictedBucketChanged(@NonNull List<JobStatus> jobs); in onRestrictedBucketChanged()
DJobCompletedListener.java19 import com.android.server.job.controllers.JobStatus;
30 void onJobCompletedLocked(JobStatus jobStatus, boolean needsReschedule); in onJobCompletedLocked()
/frameworks/base/tests/JobSchedulerPerfTests/src/com/android/frameworks/perftests/job/
DJobStorePerfTests.java32 import com.android.server.job.controllers.JobStatus;
55 private static List<JobStatus> sFewJobs = new ArrayList<>();
56 private static List<JobStatus> sManyJobs = new ArrayList<>();
80 private void runPersistedJobWriting(List<JobStatus> jobList) { in runPersistedJobWriting()
86 for (JobStatus job : jobList) { in runPersistedJobWriting()
108 private void runPersistedJobReading(List<JobStatus> jobList, boolean rtcIsGood) { in runPersistedJobReading()
114 for (JobStatus job : jobList) { in runPersistedJobReading()
148 private static JobStatus createJobStatus(String testTag, int jobId) { in createJobStatus()
153 return JobStatus.createFromJobInfo( in createJobStatus()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/
DJobSchedulerServiceTest.java61 import com.android.server.job.controllers.JobStatus;
173 private JobStatus createJobStatus(String testTag, JobInfo.Builder jobInfoBuilder) { in createJobStatus()
174 return JobStatus.createFromJobInfo( in createJobStatus()
186 JobStatus job = createJobStatus("testGetRescheduleJobForPeriodic_insideWindow", in testGetRescheduleJobForPeriodic_minPeriod()
192 JobStatus rescheduledJob = mService.getRescheduleJobForPeriodic(job); in testGetRescheduleJobForPeriodic_minPeriod()
200 JobStatus rescheduledJob = mService.getRescheduleJobForPeriodic(job); in testGetRescheduleJobForPeriodic_minPeriod()
215 JobStatus job = createJobStatus("testGetRescheduleJobForPeriodic_insideWindow", in testGetRescheduleJobForPeriodic_largePeriod()
223 JobStatus rescheduledJob = mService.getRescheduleJobForPeriodic(job); in testGetRescheduleJobForPeriodic_largePeriod()
236 JobStatus job = createJobStatus("testGetRescheduleJobForPeriodic_insideWindow", in testGetRescheduleJobForPeriodic_insideWindow()
241 JobStatus rescheduledJob = mService.getRescheduleJobForPeriodic(job); in testGetRescheduleJobForPeriodic_insideWindow()
[all …]
/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/restrictions/
DJobRestriction.java24 import com.android.server.job.controllers.JobStatus;
60 public abstract boolean isJobRestricted(JobStatus job); in isJobRestricted()

12