HomeSort by relevance Sort by last modified time
    Searched refs:workSpec (Results 26 - 38 of 38) sorted by null

12

  /frameworks/support/work/workmanager/src/main/java/androidx/work/impl/workers/
ConstraintTrackingWorker.java 32 import androidx.work.impl.model.WorkSpec;
88 WorkSpec workSpec = workDatabase.workSpecDao().getWorkSpec(getId().toString());
89 if (workSpec == null) {
96 workConstraintsTracker.replace(Collections.singletonList(workSpec));
  /frameworks/support/work/workmanager/src/androidTest/java/androidx/work/impl/workers/
ConstraintTrackingWorkerTest.java 50 import androidx.work.impl.model.WorkSpec;
164 WorkSpec workSpec = mDatabase.workSpecDao().getWorkSpec(workSpecId);
166 assertThat(workSpec.state, is(State.SUCCEEDED));
167 Data output = workSpec.output;
210 WorkSpec workSpec = mDatabase.workSpecDao().getWorkSpec(workSpecId);
212 assertThat(workSpec.state, is(State.ENQUEUED));
261 WorkSpec workSpec = mDatabase.workSpecDao().getWorkSpec(workSpecId)
    [all...]
  /frameworks/support/work/workmanager/src/main/java/androidx/work/impl/background/systemalarm/
DelayMetCommandHandler.java 31 import androidx.work.impl.model.WorkSpec;
113 // The WorkSpec had constraints. Once the execution of the worker is complete,
115 // this WorkSpec. Hence, trigger a constraints changed command.
138 Log.d(TAG, String.format("Acquiring wakelock %s for WorkSpec %s", mWakeLock, mWorkSpecId));
141 WorkSpec workSpec = mDispatcher.getWorkManager()
146 // Keep track of whether the WorkSpec had constraints. This is useful for updating the
148 mHasConstraints = workSpec.hasConstraints();
155 mWorkConstraintsTracker.replace(Collections.singletonList(workSpec));
168 Log.d(TAG, String.format("Stopping work for workspec %s", mWorkSpecId))
    [all...]
CommandHandler.java 31 import androidx.work.impl.model.WorkSpec;
201 WorkSpec workSpec = workSpecDao.getWorkSpec(workSpecId);
202 long triggerAt = workSpec.calculateNextRunTime();
204 if (!workSpec.hasConstraints()) {
  /frameworks/support/work/workmanager/src/main/java/androidx/work/
WorkRequest.java 23 import androidx.work.impl.model.WorkSpec;
53 private @NonNull WorkSpec mWorkSpec;
60 protected WorkRequest(@NonNull UUID id, @NonNull WorkSpec workSpec, @NonNull Set<String> tags) {
62 mWorkSpec = workSpec;
87 * Gets the {@link WorkSpec} associated with this unit of work.
89 * @return The {@link WorkSpec} for this unit of work
93 public WorkSpec getWorkSpec() {
118 WorkSpec mWorkSpec;
123 mWorkSpec = new WorkSpec(mId.toString(), workerClass.getName())
    [all...]
  /frameworks/support/work/workmanager/src/main/java/androidx/work/impl/
Schedulers.java 33 import androidx.work.impl.model.WorkSpec;
42 * Helps schedule {@link androidx.work.impl.model.WorkSpec}s while enforcing
59 * Schedules {@link WorkSpec}s while honoring the {@link Scheduler#MAX_SCHEDULER_LIMIT}.
70 List<WorkSpec> eligibleWorkSpecs =
79 List<WorkSpec> workSpecs) {
92 for (WorkSpec workSpec : workSpecs) {
93 workSpecDao.markWorkSpecScheduled(workSpec.id, now);
99 WorkSpec[] eligibleWorkSpecsArray = workSpecs.toArray(new WorkSpec[0])
    [all...]
WorkerWrapper.java 39 import androidx.work.impl.model.WorkSpec;
50 * A runnable that looks up the {@link WorkSpec} from the database for a given id, instantiates
64 private WorkSpec mWorkSpec;
99 Log.e(TAG, String.format("Didn't find WorkSpec for id %s", mWorkSpecId));
380 @NonNull WorkSpec workSpec,
382 String workerClassName = workSpec.workerClassName;
383 UUID workSpecId = UUID.fromString(workSpec.id);
396 * @param workSpecId The {@link WorkSpec} identifier
  /frameworks/support/work/workmanager/src/androidTest/java/androidx/work/impl/background/systemalarm/
SystemAlarmDispatcherTest.java 50 import androidx.work.impl.model.WorkSpec;
340 WorkSpec workSpec = workSpecDao.getWorkSpec(work.getStringId());
351 assertThat(workSpec.state, is(State.ENQUEUED));
374 WorkSpec workSpec = workSpecDao.getWorkSpec(work.getStringId());
384 assertThat(workSpec.state, is(State.SUCCEEDED));
427 ArgumentCaptor<WorkSpec> captor = ArgumentCaptor.forClass(WorkSpec.class);
432 List<WorkSpec> workSpecs = captor.getAllValues()
    [all...]
  /frameworks/support/work/workmanager/src/androidTest/java/androidx/work/impl/
WorkManagerImplTest.java 81 import androidx.work.impl.model.WorkSpec;
326 WorkSpec workSpec0 = mDatabase.workSpecDao().getWorkSpec(work0.getStringId());
327 WorkSpec workSpec1 = mDatabase.workSpecDao().getWorkSpec(work1.getStringId());
366 WorkSpec workSpec0 = mDatabase.workSpecDao().getWorkSpec(work0.getStringId());
367 WorkSpec workSpec1 = mDatabase.workSpecDao().getWorkSpec(work1.getStringId());
382 WorkSpec workSpec0 = mDatabase.workSpecDao().getWorkSpec(work0.getStringId());
383 WorkSpec workSpec1 = mDatabase.workSpecDao().getWorkSpec(work1.getStringId());
429 WorkSpec workSpec = mDatabase.workSpecDao().getWorkSpec(periodicWork.getStringId());
430 assertThat(workSpec.isPeriodic(), is(true))
    [all...]
WorkContinuationImplTest.java 49 import androidx.work.impl.model.WorkSpec;
316 WorkSpec joinWorkSpec = mDatabase.workSpecDao().getWorkSpec(joinId);
520 ArgumentCaptor<WorkSpec> captor = ArgumentCaptor.forClass(WorkSpec.class);
522 List<WorkSpec> workSpecs = captor.getAllValues();
526 List<WorkSpec> eligibleWorkSpecs =
533 for (WorkSpec workSpec : workSpecs) {
534 capturedIds.add(workSpec.id);
537 for (WorkSpec eligibleWorkSpec : eligibleWorkSpecs)
    [all...]
WorkerWrapperTest.java 55 import androidx.work.impl.model.WorkSpec;
125 WorkSpec latestWorkSpec = mWorkSpecDao.getWorkSpec(work.getStringId());
139 WorkSpec latestWorkSpec = mWorkSpecDao.getWorkSpec(work.getStringId());
289 ArgumentCaptor<WorkSpec> captor = ArgumentCaptor.forClass(WorkSpec.class);
410 WorkSpec workSpec = mWorkSpecDao.getWorkSpec(work.getStringId());
411 assertThat(workSpec.periodStartTime, is(greaterThan(beforeUnblockedTime)));
470 WorkSpec updatedWorkSpec = mWorkSpecDao.getWorkSpec(periodicWork.getStringId());
493 WorkSpec updatedWorkSpec = mWorkSpecDao.getWorkSpec(periodicWork.getStringId())
    [all...]
  /frameworks/support/work/workmanager/src/androidTest/java/androidx/work/impl/constraints/controllers/
ConstraintControllerTest.java 36 import androidx.work.impl.model.WorkSpec;
59 private WorkSpec createTestWorkSpec(Constraints constraints) {
65 private WorkSpec createTestConstraintWorkSpec() {
73 private WorkSpec createNoConstraintWorkSpec() {
80 mTestIdleController.replace(Collections.<WorkSpec>emptyList());
88 WorkSpec workSpecNoConstraints = createNoConstraintWorkSpec();
89 List<WorkSpec> workSpecs = Collections.singletonList(workSpecNoConstraints);
98 WorkSpec workSpecWithConstraint = createTestConstraintWorkSpec();
100 List<WorkSpec> workSpecs = Collections.singletonList(workSpecWithConstraint);
111 WorkSpec workSpecWithConstraint = createTestConstraintWorkSpec()
    [all...]
  /frameworks/support/work/workmanager/src/main/java/androidx/work/impl/model/
WorkSpecDao.java 36 * The Data Access Object for {@link WorkSpec}s.
42 * Attempts to insert a {@link WorkSpec} into the database.
44 * @param workSpec The WorkSpec to insert.
47 void insertWorkSpec(WorkSpec workSpec);
50 * Deletes {@link WorkSpec}s from the database.
52 * @param id The WorkSpec id to delete.
54 @Query("DELETE FROM workspec WHERE id=:id")
59 * @return The WorkSpec associated with that i
    [all...]

Completed in 155 milliseconds

12