mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 20:31:02 -05:00
Set flex time
This commit is contained in:
parent
b837424f29
commit
52f4bddbce
2 changed files with 4 additions and 2 deletions
|
@ -30,9 +30,10 @@ class LibraryUpdateJob : Job() {
|
||||||
JobRequest.NetworkType.CONNECTED
|
JobRequest.NetworkType.CONNECTED
|
||||||
|
|
||||||
JobRequest.Builder(TAG)
|
JobRequest.Builder(TAG)
|
||||||
.setPeriodic(interval * 60 * 60 * 1000L)
|
.setPeriodic(interval * 60 * 60 * 1000L, 10 * 60 * 1000)
|
||||||
.setRequiredNetworkType(wifiRestriction)
|
.setRequiredNetworkType(wifiRestriction)
|
||||||
.setRequiresCharging(acRestriction)
|
.setRequiresCharging(acRestriction)
|
||||||
|
.setRequirementsEnforced(true)
|
||||||
.setPersisted(true)
|
.setPersisted(true)
|
||||||
.setUpdateCurrent(true)
|
.setUpdateCurrent(true)
|
||||||
.build()
|
.build()
|
||||||
|
|
|
@ -45,8 +45,9 @@ class UpdateCheckerJob : Job() {
|
||||||
|
|
||||||
fun setupTask() {
|
fun setupTask() {
|
||||||
JobRequest.Builder(TAG)
|
JobRequest.Builder(TAG)
|
||||||
.setPeriodic(24 * 60 * 60 * 1000)
|
.setPeriodic(24 * 60 * 60 * 1000, 60 * 60 * 1000)
|
||||||
.setRequiredNetworkType(JobRequest.NetworkType.CONNECTED)
|
.setRequiredNetworkType(JobRequest.NetworkType.CONNECTED)
|
||||||
|
.setRequirementsEnforced(true)
|
||||||
.setPersisted(true)
|
.setPersisted(true)
|
||||||
.setUpdateCurrent(true)
|
.setUpdateCurrent(true)
|
||||||
.build()
|
.build()
|
||||||
|
|
Loading…
Reference in a new issue