Home
last modified time | relevance | path

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

/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/controllers/
DConnectivityController.java247 public void maybeStartTrackingJobLocked(JobStatus jobStatus, JobStatus lastJob) { in maybeStartTrackingJobLocked() argument
248 if (jobStatus.hasConnectivityConstraint()) { in maybeStartTrackingJobLocked()
250 getUidStats(jobStatus.getSourceUid(), jobStatus.getSourcePackageName(), false); in maybeStartTrackingJobLocked()
251 if (wouldBeReadyWithConstraintLocked(jobStatus, JobStatus.CONSTRAINT_CONNECTIVITY)) { in maybeStartTrackingJobLocked()
254 ArraySet<JobStatus> jobs = mTrackedJobs.get(jobStatus.getSourceUid()); in maybeStartTrackingJobLocked()
257 mTrackedJobs.put(jobStatus.getSourceUid(), jobs); in maybeStartTrackingJobLocked()
259 jobs.add(jobStatus); in maybeStartTrackingJobLocked()
260 jobStatus.setTrackingController(JobStatus.TRACKING_CONNECTIVITY); in maybeStartTrackingJobLocked()
261 updateConstraintsSatisfied(jobStatus); in maybeStartTrackingJobLocked()
267 public void prepareForExecutionLocked(JobStatus jobStatus) { in prepareForExecutionLocked() argument
[all …]
DBackgroundJobsController.java74 public void maybeStartTrackingJobLocked(JobStatus jobStatus, JobStatus lastJob) { in maybeStartTrackingJobLocked() argument
75 updateSingleJobRestrictionLocked(jobStatus, sElapsedRealtimeClock.millis(), UNKNOWN); in maybeStartTrackingJobLocked()
79 public void maybeStopTrackingJobLocked(JobStatus jobStatus, JobStatus incomingJob, in maybeStopTrackingJobLocked() argument
84 public void evaluateStateLocked(JobStatus jobStatus) { in evaluateStateLocked() argument
85 if (jobStatus.isRequestedExpeditedJob()) { in evaluateStateLocked()
88 updateSingleJobRestrictionLocked(jobStatus, sElapsedRealtimeClock.millis(), UNKNOWN); in evaluateStateLocked()
98 mService.getJobStore().forEachJob(predicate, (jobStatus) -> { in dumpControllerStateLocked()
99 final int uid = jobStatus.getSourceUid(); in dumpControllerStateLocked()
100 final String sourcePkg = jobStatus.getSourcePackageName(); in dumpControllerStateLocked()
102 jobStatus.printUniqueId(pw); in dumpControllerStateLocked()
[all …]
DDeviceIdleJobsController.java123 private final Predicate<JobStatus> mShouldRushEvaluation = (jobStatus) ->
124 jobStatus.isRequestedExpeditedJob() || mForegroundUids.get(jobStatus.getSourceUid());
217 public void maybeStartTrackingJobLocked(JobStatus jobStatus, JobStatus lastJob) { in maybeStartTrackingJobLocked() argument
218 if ((jobStatus.getFlags()&JobInfo.FLAG_IMPORTANT_WHILE_FOREGROUND) != 0) { in maybeStartTrackingJobLocked()
219 mAllowInIdleJobs.add(jobStatus); in maybeStartTrackingJobLocked()
221 updateTaskStateLocked(jobStatus, sElapsedRealtimeClock.millis()); in maybeStartTrackingJobLocked()
225 public void maybeStopTrackingJobLocked(JobStatus jobStatus, JobStatus incomingJob, in maybeStopTrackingJobLocked() argument
227 if ((jobStatus.getFlags()&JobInfo.FLAG_IMPORTANT_WHILE_FOREGROUND) != 0) { in maybeStopTrackingJobLocked()
228 mAllowInIdleJobs.remove(jobStatus); in maybeStopTrackingJobLocked()
238 mService.getJobStore().forEachJob(predicate, (jobStatus) -> { in dumpControllerStateLocked()
[all …]
DComponentController.java120 public void maybeStartTrackingJobLocked(JobStatus jobStatus, JobStatus lastJob) { in maybeStartTrackingJobLocked() argument
121 updateComponentEnabledStateLocked(jobStatus); in maybeStartTrackingJobLocked()
125 public void maybeStopTrackingJobLocked(JobStatus jobStatus, JobStatus incomingJob, in maybeStopTrackingJobLocked() argument
143 private ServiceInfo getServiceInfoLocked(JobStatus jobStatus) { in getServiceInfoLocked() argument
144 final ComponentName service = jobStatus.getServiceComponent(); in getServiceInfoLocked()
145 final int userId = jobStatus.getUserId(); in getServiceInfoLocked()
161 if (mService.areUsersStartedLocked(jobStatus)) { in getServiceInfoLocked()
174 private boolean updateComponentEnabledStateLocked(JobStatus jobStatus) { in updateComponentEnabledStateLocked() argument
175 final ServiceInfo service = getServiceInfoLocked(jobStatus); in updateComponentEnabledStateLocked()
178 Slog.v(TAG, jobStatus.toShortString() + " component not present"); in updateComponentEnabledStateLocked()
[all …]
DStateController.java70 public abstract void maybeStartTrackingJobLocked(JobStatus jobStatus, JobStatus lastJob); in maybeStartTrackingJobLocked() argument
75 public void prepareForExecutionLocked(JobStatus jobStatus) { in prepareForExecutionLocked() argument
81 public void unprepareFromExecutionLocked(JobStatus jobStatus) { in unprepareFromExecutionLocked() argument
87 public abstract void maybeStopTrackingJobLocked(JobStatus jobStatus, JobStatus incomingJob, in maybeStopTrackingJobLocked() argument
125 public void evaluateStateLocked(JobStatus jobStatus) { in evaluateStateLocked() argument
143 protected boolean wouldBeReadyWithConstraintLocked(JobStatus jobStatus, int constraint) { in wouldBeReadyWithConstraintLocked() argument
145 final boolean jobWouldBeReady = jobStatus.wouldBeReadyWithConstraint(constraint); in wouldBeReadyWithConstraintLocked()
147 Slog.v(TAG, "wouldBeReadyWithConstraintLocked: " + jobStatus.toShortString() in wouldBeReadyWithConstraintLocked()
158 return mService.areComponentsInPlaceLocked(jobStatus); in wouldBeReadyWithConstraintLocked()
DQuotaController.java625 public void maybeStartTrackingJobLocked(JobStatus jobStatus, JobStatus lastJob) { in maybeStartTrackingJobLocked() argument
627 final int userId = jobStatus.getSourceUserId(); in maybeStartTrackingJobLocked()
628 final String pkgName = jobStatus.getSourcePackageName(); in maybeStartTrackingJobLocked()
634 jobs.add(jobStatus); in maybeStartTrackingJobLocked()
635 jobStatus.setTrackingController(JobStatus.TRACKING_QUOTA); in maybeStartTrackingJobLocked()
636 final boolean isWithinQuota = isWithinQuotaLocked(jobStatus); in maybeStartTrackingJobLocked()
637 setConstraintSatisfied(jobStatus, nowElapsed, isWithinQuota); in maybeStartTrackingJobLocked()
639 if (jobStatus.isRequestedExpeditedJob()) { in maybeStartTrackingJobLocked()
640 final boolean isWithinEJQuota = isWithinEJQuotaLocked(jobStatus); in maybeStartTrackingJobLocked()
641 setExpeditedConstraintSatisfied(jobStatus, nowElapsed, isWithinEJQuota); in maybeStartTrackingJobLocked()
[all …]
DIdleController.java71 public void startTrackingRestrictedJobLocked(JobStatus jobStatus) { in startTrackingRestrictedJobLocked() argument
72 maybeStartTrackingJobLocked(jobStatus, null); in startTrackingRestrictedJobLocked()
84 public void stopTrackingRestrictedJobLocked(JobStatus jobStatus) { in stopTrackingRestrictedJobLocked() argument
85 if (!jobStatus.hasIdleConstraint()) { in stopTrackingRestrictedJobLocked()
86 maybeStopTrackingJobLocked(jobStatus, null, false); in stopTrackingRestrictedJobLocked()
DRestrictingController.java34 public abstract void startTrackingRestrictedJobLocked(JobStatus jobStatus); in startTrackingRestrictedJobLocked() argument
40 public abstract void stopTrackingRestrictedJobLocked(JobStatus jobStatus); in stopTrackingRestrictedJobLocked() argument
DBatteryController.java78 public void startTrackingRestrictedJobLocked(JobStatus jobStatus) { in startTrackingRestrictedJobLocked() argument
79 maybeStartTrackingJobLocked(jobStatus, null); in startTrackingRestrictedJobLocked()
90 public void stopTrackingRestrictedJobLocked(JobStatus jobStatus) { in stopTrackingRestrictedJobLocked() argument
91 if (!jobStatus.hasPowerConstraint()) { in stopTrackingRestrictedJobLocked()
92 maybeStopTrackingJobLocked(jobStatus, null, false); in stopTrackingRestrictedJobLocked()
DJobStatus.java556 public JobStatus(JobStatus jobStatus) { in JobStatus() argument
557 this(jobStatus.getJob(), jobStatus.getUid(), in JobStatus()
558 jobStatus.getSourcePackageName(), jobStatus.getSourceUserId(), in JobStatus()
559 jobStatus.getStandbyBucket(), in JobStatus()
560 jobStatus.getSourceTag(), jobStatus.getNumFailures(), in JobStatus()
561 jobStatus.getEarliestRunTime(), jobStatus.getLatestRunTimeElapsed(), in JobStatus()
562 jobStatus.getLastSuccessfulRunTime(), jobStatus.getLastFailedRunTime(), in JobStatus()
563 jobStatus.getInternalFlags(), jobStatus.mDynamicConstraints); in JobStatus()
564 mPersistedUtcTimes = jobStatus.mPersistedUtcTimes; in JobStatus()
565 if (jobStatus.mPersistedUtcTimes != null) { in JobStatus()
DContentObserverController.java275 JobInstance(JobStatus jobStatus) { in JobInstance() argument
276 mJobStatus = jobStatus; in JobInstance()
279 final JobInfo.TriggerContentUri[] uris = jobStatus.getJob().getTriggerContentUris(); in JobInstance()
280 final int sourceUserId = jobStatus.getSourceUserId(); in JobInstance()
291 obs = new ObserverInstance(mHandler, uri, jobStatus.getSourceUserId()); in JobInstance()
/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/
DJobStore.java213 public boolean add(JobStatus jobStatus) { in add() argument
214 boolean replaced = mJobSet.remove(jobStatus); in add()
215 mJobSet.add(jobStatus); in add()
216 if (jobStatus.isPersisted()) { in add()
220 Slog.d(TAG, "Added job status to store: " + jobStatus); in add()
225 boolean containsJob(JobStatus jobStatus) { in containsJob() argument
226 return mJobSet.contains(jobStatus); in containsJob()
247 public boolean remove(JobStatus jobStatus, boolean removeFromPersisted) { in remove() argument
248 boolean removed = mJobSet.remove(jobStatus); in remove()
251 Slog.d(TAG, "Couldn't remove job: didn't exist: " + jobStatus); in remove()
[all …]
DJobConcurrencyManager.java726 final JobStatus jobStatus = jsc.getRunningJobLocked(); in stopLongRunningJobsLocked() local
728 if (jobStatus != null && !jsc.isWithinExecutionGuaranteeTime()) { in stopLongRunningJobsLocked()
775 private boolean isPkgConcurrencyLimitedLocked(@NonNull JobStatus jobStatus) { in isPkgConcurrencyLimitedLocked() argument
776 if (jobStatus.lastEvaluatedPriority >= JobInfo.PRIORITY_TOP_APP) { in isPkgConcurrencyLimitedLocked()
789 mActivePkgStats.get(jobStatus.getSourceUserId(), jobStatus.getSourcePackageName()); in isPkgConcurrencyLimitedLocked()
794 if (jobStatus.shouldTreatAsExpeditedJob()) { in isPkgConcurrencyLimitedLocked()
803 private void startJobLocked(@NonNull JobServiceContext worker, @NonNull JobStatus jobStatus, in startJobLocked() argument
808 controllers.get(ic).prepareForExecutionLocked(jobStatus); in startJobLocked()
811 getPkgStatsLocked(jobStatus.getSourceUserId(), jobStatus.getSourcePackageName()); in startJobLocked()
812 packageStats.adjustStagedCount(false, jobStatus.shouldTreatAsExpeditedJob()); in startJobLocked()
[all …]
DJobSchedulerService.java1114 JobStatus jobStatus = JobStatus.createFromJobInfo(job, uId, packageName, userId, tag);
1117 if (jobStatus.isRequestedExpeditedJob()
1118 && !mQuotaController.isWithinEJQuotaLocked(jobStatus)) {
1126 jobStatus.maybeAddForegroundExemption(mIsUidActivePredicate);
1128 if (DEBUG) Slog.d(TAG, "SCHEDULE: " + jobStatus.toShortString());
1139 jobStatus.prepareLocked();
1143 cancelJobImplLocked(toCancel, jobStatus, JobParameters.STOP_REASON_CANCELLED_BY_APP,
1146 startTrackingJobLocked(jobStatus, null);
1151 jobStatus.enqueueWorkLocked(work);
1155 uId, null, jobStatus.getBatteryName(),
[all …]
DJobCompletedListener.java32 void onJobCompletedLocked(JobStatus jobStatus, int stopReason, boolean needsReschedule); in onJobCompletedLocked() argument
DStateChangedListener.java43 public void onRunJobNow(JobStatus jobStatus); in onRunJobNow() argument
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/controllers/
DQuotaControllerTest.java830 JobStatus jobStatus = createJobStatus("testUpdateExecutionStatsLocked_WithTimer", i); in testUpdateExecutionStatsLocked_WithTimer() local
831 setStandbyBucket(RARE_INDEX, jobStatus); // 24 hour window in testUpdateExecutionStatsLocked_WithTimer()
833 mQuotaController.maybeStartTrackingJobLocked(jobStatus, null); in testUpdateExecutionStatsLocked_WithTimer()
834 mQuotaController.prepareForExecutionLocked(jobStatus); in testUpdateExecutionStatsLocked_WithTimer()
849 assertTrue("Job not ready: " + jobStatus, jobStatus.isReady()); in testUpdateExecutionStatsLocked_WithTimer()
875 JobStatus jobStatus = createJobStatus("testUpdateExecutionStatsLocked_WithTimer", 0); in testUpdateExecutionStatsLocked_WithTimer() local
876 setStandbyBucket(RARE_INDEX, jobStatus); // 24 hour window in testUpdateExecutionStatsLocked_WithTimer()
878 mQuotaController.maybeStartTrackingJobLocked(jobStatus, null); in testUpdateExecutionStatsLocked_WithTimer()
879 mQuotaController.prepareForExecutionLocked(jobStatus); in testUpdateExecutionStatsLocked_WithTimer()
897 assertFalse("Job unexpectedly ready: " + jobStatus, jobStatus.isReady()); in testUpdateExecutionStatsLocked_WithTimer()
[all …]
DStateControllerTest.java81 public void maybeStartTrackingJobLocked(JobStatus jobStatus, JobStatus lastJob) { in maybeStartTrackingJobLocked() argument
84 public void maybeStopTrackingJobLocked(JobStatus jobStatus, JobStatus incomingJob, in maybeStopTrackingJobLocked() argument
DJobStatusTest.java116 private static void assertEffectiveBucketForMediaExemption(JobStatus jobStatus, in assertEffectiveBucketForMediaExemption() argument
126 jobStatus.setStandbyBucket(effectiveBucket.keyAt(i)); in assertEffectiveBucketForMediaExemption()
127 assertEquals(effectiveBucket.valueAt(i), jobStatus.getEffectiveStandbyBucket()); in assertEffectiveBucketForMediaExemption()
696 JobStatus jobStatus = JobStatus.createFromJobInfo(job, 0, null, -1, "JobStatusTest"); in createJobStatus() local
697 jobStatus.serviceInfo = mock(ServiceInfo.class); in createJobStatus()
698 return jobStatus; in createJobStatus()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/
DJobConcurrencyManagerTest.java182 JobStatus jobStatus = JobStatus.createFromJobInfo( in createJob() local
186 return jobStatus; in createJob()
/frameworks/base/services/tests/servicestests/src/com/android/server/job/
DJobStoreTest.java351 JobStatus jobStatus = jobStatusSet.getAllJobs().iterator().next(); in testNonPersistedTaskIsNotPersisted() local
352 assertEquals("Wrong job persisted.", 43, jobStatus.getJobId()); in testNonPersistedTaskIsNotPersisted()