Home
last modified time | relevance | path

Searched refs:flexDuration (Results 1 – 6 of 6) sorted by relevance

/frameworks/support/work/workmanager/src/main/java/androidx/work/impl/model/
DWorkSpec.java91 public long flexDuration; field in WorkSpec
170 public void setPeriodic(long intervalDuration, long flexDuration) { in setPeriodic() argument
177 if (flexDuration < MIN_PERIODIC_FLEX_MILLIS) { in setPeriodic()
181 flexDuration = MIN_PERIODIC_FLEX_MILLIS; in setPeriodic()
183 if (flexDuration > intervalDuration) { in setPeriodic()
186 flexDuration = intervalDuration; in setPeriodic()
189 this.flexDuration = flexDuration; in setPeriodic()
224 return periodStartTime + intervalDuration - flexDuration; in calculateNextRunTime()
246 if (flexDuration != workSpec.flexDuration) return false; in equals()
276 result = 31 * result + (int) (flexDuration ^ (flexDuration >>> 32)); in hashCode()
/frameworks/support/work/workmanager/src/androidTest/java/androidx/work/
DPeriodicWorkTest.java67 assertThat(getWorkSpec(periodicWork).flexDuration, is(testInterval)); in testBuild_setPeriodic_onlyIntervalDuration_inRange()
81 assertThat(getWorkSpec(periodicWork).flexDuration, in testBuild_setPeriodic_onlyIntervalDuration_outOfRange()
98 assertThat(getWorkSpec(periodicWork).flexDuration, is(testFlex)); in testBuild_setPeriodic_intervalAndFlexDurations_inRange()
115 assertThat(getWorkSpec(periodicWork).flexDuration, in testBuild_setPeriodic_intervalAndFlexDurations_outOfRange()
132 assertThat(getWorkSpec(periodicWork).flexDuration, in testBuild_setPeriodic_intervalInRange_flexOutOfRange()
150 assertThat(getWorkSpec(periodicWork).flexDuration, is(testFlex)); in testBuild_setPeriodic_intervalOutOfRange_flexInRange()
168 getWorkSpec(periodicWork).flexDuration, in testBuild_setPeriodic_withDurationParameters()
/frameworks/support/work/workmanager-ktx/src/androidTest/java/androidx/work/
DPeriodicWorkRequestTest.kt41 assertEquals(workRequest.workSpec.flexDuration, TimeUnit.MINUTES.toMillis(15)) in testPeriodicWorkRequestBuilder()
53 assertEquals(workRequest.workSpec.flexDuration, repeatInterval.toMillis()) in testPeriodicWorkRequestBuilder_withDuration()
66 assertEquals(workRequest.workSpec.flexDuration, TimeUnit.MINUTES.toMillis(10)) in testPeriodicWorkRequestBuilder_withFlexTime()
81 assertEquals(workRequest.workSpec.flexDuration, flexInterval.toMillis()) in testPeriodicWorkRequestBuilder_withFlexTimeandDuration()
/frameworks/support/work/workmanager/src/main/java/androidx/work/impl/background/systemjob/
DSystemJobInfoConverter.java91 builder.setPeriodic(workSpec.intervalDuration, workSpec.flexDuration); in convert()
/frameworks/support/work/workmanager-firebase/src/main/java/androidx/work/impl/background/firebase/
DFirebaseJobConverter.java94 int flexDurationSeconds = convertMillisecondsToSeconds(workSpec.flexDuration); in createPeriodicTrigger()
/frameworks/support/work/workmanager/src/androidTest/java/androidx/work/impl/
DWorkManagerImplTest.java432 assertThat(workSpec.flexDuration, is(PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS)); in testEnqueue_insertPeriodicWork()