/frameworks/base/services/core/java/com/android/server/job/controllers/ |
D | ConnectivityController.java | 114 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 …]
|
D | BackgroundJobsController.java | 68 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 …]
|
D | DeviceIdleJobsController.java | 215 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 …]
|
D | StateController.java | 67 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()
|
D | QuotaController.java | 606 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 …]
|
D | JobStatus.java | 440 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()
|
D | ContentObserverController.java | 251 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/ |
D | JobStore.java | 208 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 …]
|
D | JobSchedulerService.java | 1025 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 …]
|
D | JobCompletedListener.java | 30 void onJobCompletedLocked(JobStatus jobStatus, boolean needsReschedule); in onJobCompletedLocked() argument
|
D | StateChangedListener.java | 39 public void onRunJobNow(JobStatus jobStatus); in onRunJobNow() argument
|
D | JobConcurrencyManager.java | 436 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/ |
D | QuotaControllerTest.java | 1194 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 …]
|
D | StateControllerTest.java | 81 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/ |
D | JobStoreTest.java | 335 JobStatus jobStatus = jobStatusSet.getAllJobs().iterator().next(); in testNonPersistedTaskIsNotPersisted() local 336 assertEquals("Wrong job persisted.", 43, jobStatus.getJobId()); in testNonPersistedTaskIsNotPersisted()
|