/*package*/ static long getMinInterval() { return JobConfig.isAllowSmallerIntervalsForMarshmallow() ? TimeUnit.MINUTES.toMillis(1) : MIN_INTERVAL; }
/*package*/ static long getMinFlex() { return JobConfig.isAllowSmallerIntervalsForMarshmallow() ? TimeUnit.SECONDS.toMillis(30) : MIN_FLEX; }
@Test @Config(sdk = Build.VERSION_CODES.LOLLIPOP) public void verifyReset() { assertThat(JobConfig.isApiEnabled(JobApi.V_19)).isTrue(); // default JobConfig.setApiEnabled(JobApi.V_19, false); assertThat(JobConfig.isApiEnabled(JobApi.V_19)).isFalse(); // did change assertThat(JobConfig.isAllowSmallerIntervalsForMarshmallow()).isFalse(); // default JobConfig.setAllowSmallerIntervalsForMarshmallow(true); assertThat(JobConfig.isAllowSmallerIntervalsForMarshmallow()).isTrue(); // did change JobConfig.reset(); assertThat(JobConfig.isApiEnabled(JobApi.V_19)).isTrue(); // default assertThat(JobConfig.isAllowSmallerIntervalsForMarshmallow()).isFalse(); // default }
/*package*/ static long getMinInterval() { return JobConfig.isAllowSmallerIntervalsForMarshmallow() ? TimeUnit.MINUTES.toMillis(1) : MIN_INTERVAL; }
/*package*/ static long getMinFlex() { return JobConfig.isAllowSmallerIntervalsForMarshmallow() ? TimeUnit.SECONDS.toMillis(30) : MIN_FLEX; }