Home
last modified time | relevance | path

Searched refs:jobStatus (Results 1 – 15 of 15) sorted by relevance

/frameworks/base/services/core/java/com/android/server/job/controllers/
DConnectivityController.java114 public void maybeStartTrackingJobLocked(JobStatus jobStatus, JobStatus lastJob) { in maybeStartTrackingJobLocked() argument
115 if (jobStatus.hasConnectivityConstraint()) { in maybeStartTrackingJobLocked()
116 updateConstraintsSatisfied(jobStatus); in maybeStartTrackingJobLocked()
117 ArraySet<JobStatus> jobs = mTrackedJobs.get(jobStatus.getSourceUid()); in maybeStartTrackingJobLocked()
120 mTrackedJobs.put(jobStatus.getSourceUid(), jobs); in maybeStartTrackingJobLocked()
122 jobs.add(jobStatus); in maybeStartTrackingJobLocked()
123 jobStatus.setTrackingController(JobStatus.TRACKING_CONNECTIVITY); in maybeStartTrackingJobLocked()
129 public void maybeStopTrackingJobLocked(JobStatus jobStatus, JobStatus incomingJob, in maybeStopTrackingJobLocked() argument
131 if (jobStatus.clearTrackingController(JobStatus.TRACKING_CONNECTIVITY)) { in maybeStopTrackingJobLocked()
132 ArraySet<JobStatus> jobs = mTrackedJobs.get(jobStatus.getSourceUid()); in maybeStopTrackingJobLocked()
[all …]
DBackgroundJobsController.java68 public void maybeStartTrackingJobLocked(JobStatus jobStatus, JobStatus lastJob) { in maybeStartTrackingJobLocked() argument
69 updateSingleJobRestrictionLocked(jobStatus, UNKNOWN); in maybeStartTrackingJobLocked()
73 public void maybeStopTrackingJobLocked(JobStatus jobStatus, JobStatus incomingJob, in maybeStopTrackingJobLocked() argument
83 mService.getJobStore().forEachJob(predicate, (jobStatus) -> { in dumpControllerStateLocked()
84 final int uid = jobStatus.getSourceUid(); in dumpControllerStateLocked()
85 final String sourcePkg = jobStatus.getSourcePackageName(); in dumpControllerStateLocked()
87 jobStatus.printUniqueId(pw); in dumpControllerStateLocked()
102 if ((jobStatus.satisfiedConstraints in dumpControllerStateLocked()
120 mService.getJobStore().forEachJob(predicate, (jobStatus) -> { in dumpControllerStateLocked()
124 jobStatus.writeToShortProto(proto, in dumpControllerStateLocked()
[all …]
DDeviceIdleJobsController.java215 public void maybeStartTrackingJobLocked(JobStatus jobStatus, JobStatus lastJob) { in maybeStartTrackingJobLocked() argument
216 if ((jobStatus.getFlags()&JobInfo.FLAG_IMPORTANT_WHILE_FOREGROUND) != 0) { in maybeStartTrackingJobLocked()
217 mAllowInIdleJobs.add(jobStatus); in maybeStartTrackingJobLocked()
219 updateTaskStateLocked(jobStatus); in maybeStartTrackingJobLocked()
223 public void maybeStopTrackingJobLocked(JobStatus jobStatus, JobStatus incomingJob, in maybeStopTrackingJobLocked() argument
225 if ((jobStatus.getFlags()&JobInfo.FLAG_IMPORTANT_WHILE_FOREGROUND) != 0) { in maybeStopTrackingJobLocked()
226 mAllowInIdleJobs.remove(jobStatus); in maybeStopTrackingJobLocked()
236 mService.getJobStore().forEachJob(predicate, (jobStatus) -> { in dumpControllerStateLocked()
238 jobStatus.printUniqueId(pw); in dumpControllerStateLocked()
240 UserHandle.formatUid(pw, jobStatus.getSourceUid()); in dumpControllerStateLocked()
[all …]
DStateController.java67 public abstract void maybeStartTrackingJobLocked(JobStatus jobStatus, JobStatus lastJob); in maybeStartTrackingJobLocked() argument
72 public void prepareForExecutionLocked(JobStatus jobStatus) { in prepareForExecutionLocked() argument
78 public abstract void maybeStopTrackingJobLocked(JobStatus jobStatus, JobStatus incomingJob, in maybeStopTrackingJobLocked() argument
105 public void evaluateStateLocked(JobStatus jobStatus) { in evaluateStateLocked() argument
115 protected boolean wouldBeReadyWithConstraintLocked(JobStatus jobStatus, int constraint) { in wouldBeReadyWithConstraintLocked() argument
117 final boolean jobWouldBeReady = jobStatus.wouldBeReadyWithConstraint(constraint); in wouldBeReadyWithConstraintLocked()
119 Slog.v(TAG, "wouldBeReadyWithConstraintLocked: " + jobStatus.toShortString() in wouldBeReadyWithConstraintLocked()
130 return mService.areComponentsInPlaceLocked(jobStatus); in wouldBeReadyWithConstraintLocked()
DQuotaController.java606 public void maybeStartTrackingJobLocked(JobStatus jobStatus, JobStatus lastJob) { in maybeStartTrackingJobLocked() argument
607 final int userId = jobStatus.getSourceUserId(); in maybeStartTrackingJobLocked()
608 final String pkgName = jobStatus.getSourcePackageName(); in maybeStartTrackingJobLocked()
616 jobs.add(jobStatus); in maybeStartTrackingJobLocked()
617 jobStatus.setTrackingController(JobStatus.TRACKING_QUOTA); in maybeStartTrackingJobLocked()
619 final boolean isWithinQuota = isWithinQuotaLocked(jobStatus); in maybeStartTrackingJobLocked()
620 setConstraintSatisfied(jobStatus, isWithinQuota); in maybeStartTrackingJobLocked()
623 getEffectiveStandbyBucket(jobStatus)); in maybeStartTrackingJobLocked()
627 jobStatus.setQuotaConstraintSatisfied(true); in maybeStartTrackingJobLocked()
632 public void prepareForExecutionLocked(JobStatus jobStatus) { in prepareForExecutionLocked() argument
[all …]
DJobStatus.java440 public JobStatus(JobStatus jobStatus) { in JobStatus() argument
441 this(jobStatus.getJob(), jobStatus.getUid(), jobStatus.targetSdkVersion, in JobStatus()
442 jobStatus.getSourcePackageName(), jobStatus.getSourceUserId(), in JobStatus()
443 jobStatus.getStandbyBucket(), jobStatus.getBaseHeartbeat(), in JobStatus()
444 jobStatus.getSourceTag(), jobStatus.getNumFailures(), in JobStatus()
445 jobStatus.getEarliestRunTime(), jobStatus.getLatestRunTimeElapsed(), in JobStatus()
446 jobStatus.getLastSuccessfulRunTime(), jobStatus.getLastFailedRunTime(), in JobStatus()
447 jobStatus.getInternalFlags()); in JobStatus()
448 mPersistedUtcTimes = jobStatus.mPersistedUtcTimes; in JobStatus()
449 if (jobStatus.mPersistedUtcTimes != null) { in JobStatus()
DContentObserverController.java251 JobInstance(JobStatus jobStatus) { in JobInstance() argument
252 mJobStatus = jobStatus; in JobInstance()
255 final JobInfo.TriggerContentUri[] uris = jobStatus.getJob().getTriggerContentUris(); in JobInstance()
256 final int sourceUserId = jobStatus.getSourceUserId(); in JobInstance()
267 obs = new ObserverInstance(mHandler, uri, jobStatus.getSourceUserId()); in JobInstance()
/frameworks/base/services/core/java/com/android/server/job/
DJobStore.java208 public boolean add(JobStatus jobStatus) { in add() argument
209 boolean replaced = mJobSet.remove(jobStatus); in add()
210 mJobSet.add(jobStatus); in add()
211 if (jobStatus.isPersisted()) { in add()
215 Slog.d(TAG, "Added job status to store: " + jobStatus); in add()
220 boolean containsJob(JobStatus jobStatus) { in containsJob() argument
221 return mJobSet.contains(jobStatus); in containsJob()
241 public boolean remove(JobStatus jobStatus, boolean writeBack) { in remove() argument
242 boolean removed = mJobSet.remove(jobStatus); in remove()
245 Slog.d(TAG, "Couldn't remove job: didn't exist: " + jobStatus); in remove()
[all …]
DJobSchedulerService.java1025 JobStatus jobStatus = JobStatus.createFromJobInfo(job, uId, packageName, userId, tag); in scheduleAsPackage() local
1031 jobStatus.maybeAddForegroundExemption(mIsUidActivePredicate); in scheduleAsPackage()
1033 if (DEBUG) Slog.d(TAG, "SCHEDULE: " + jobStatus.toShortString()); in scheduleAsPackage()
1044 jobStatus.prepareLocked(ActivityManager.getService()); in scheduleAsPackage()
1048 jobStatus.enqueueWorkLocked(ActivityManager.getService(), work); in scheduleAsPackage()
1053 cancelJobImplLocked(toCancel, jobStatus, "job rescheduled by app"); in scheduleAsPackage()
1055 startTrackingJobLocked(jobStatus, null); in scheduleAsPackage()
1058 uId, null, jobStatus.getBatteryName(), in scheduleAsPackage()
1060 JobProtoEnums.STOP_REASON_CANCELLED, jobStatus.getStandbyBucket(), in scheduleAsPackage()
1061 jobStatus.getJobId()); in scheduleAsPackage()
[all …]
DJobCompletedListener.java30 void onJobCompletedLocked(JobStatus jobStatus, boolean needsReschedule); in onJobCompletedLocked() argument
DStateChangedListener.java39 public void onRunJobNow(JobStatus jobStatus); in onRunJobNow() argument
DJobConcurrencyManager.java436 private static int findJobContextIdFromMap(JobStatus jobStatus, JobStatus[] map) { in findJobContextIdFromMap() argument
438 if (map[i] != null && map[i].matches(jobStatus.getUid(), jobStatus.getJobId())) { in findJobContextIdFromMap()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/controllers/
DQuotaControllerTest.java1194 JobStatus jobStatus = createJobStatus( in testIsWithinQuotaLocked_UnderDuration_UnderJobCount_MultiStateChange_BelowFGS() local
1196 setStandbyBucket(ACTIVE_INDEX, jobStatus); in testIsWithinQuotaLocked_UnderDuration_UnderJobCount_MultiStateChange_BelowFGS()
1199 mQuotaController.maybeStartTrackingJobLocked(jobStatus, null); in testIsWithinQuotaLocked_UnderDuration_UnderJobCount_MultiStateChange_BelowFGS()
1200 mQuotaController.prepareForExecutionLocked(jobStatus); in testIsWithinQuotaLocked_UnderDuration_UnderJobCount_MultiStateChange_BelowFGS()
1206 mQuotaController.maybeStopTrackingJobLocked(jobStatus, null, false); in testIsWithinQuotaLocked_UnderDuration_UnderJobCount_MultiStateChange_BelowFGS()
1210 mQuotaController.maybeStartTrackingJobLocked(jobStatus, null); in testIsWithinQuotaLocked_UnderDuration_UnderJobCount_MultiStateChange_BelowFGS()
1211 mQuotaController.prepareForExecutionLocked(jobStatus); in testIsWithinQuotaLocked_UnderDuration_UnderJobCount_MultiStateChange_BelowFGS()
1217 mQuotaController.maybeStopTrackingJobLocked(jobStatus, null, false); in testIsWithinQuotaLocked_UnderDuration_UnderJobCount_MultiStateChange_BelowFGS()
1223 assertTrue(mQuotaController.isWithinQuotaLocked(jobStatus)); in testIsWithinQuotaLocked_UnderDuration_UnderJobCount_MultiStateChange_BelowFGS()
1391 JobStatus jobStatus = createJobStatus("testMaybeScheduleStartAlarmLocked_Active", 1); in testMaybeScheduleStartAlarmLocked_Active() local
[all …]
DStateControllerTest.java81 public void maybeStartTrackingJobLocked(JobStatus jobStatus, JobStatus lastJob) { in maybeStartTrackingJobLocked() argument
84 public void maybeStopTrackingJobLocked(JobStatus jobStatus, JobStatus incomingJob, in maybeStopTrackingJobLocked() argument
/frameworks/base/services/tests/servicestests/src/com/android/server/job/
DJobStoreTest.java335 JobStatus jobStatus = jobStatusSet.getAllJobs().iterator().next(); in testNonPersistedTaskIsNotPersisted() local
336 assertEquals("Wrong job persisted.", 43, jobStatus.getJobId()); in testNonPersistedTaskIsNotPersisted()