Remove logWorkInfo as some part of it isn't in AOSP version of workmanger
It was meant for debugging only anyway
This commit is contained in:
parent
a380445693
commit
c832cd9886
1 changed files with 0 additions and 12 deletions
|
@ -6,7 +6,6 @@
|
|||
package com.stevesoltys.seedvault
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import androidx.work.BackoffPolicy
|
||||
import androidx.work.Constraints
|
||||
import androidx.work.ExistingPeriodicWorkPolicy.UPDATE
|
||||
|
@ -16,7 +15,6 @@ import androidx.work.WorkManager
|
|||
import androidx.work.Worker
|
||||
import androidx.work.WorkerParameters
|
||||
import com.stevesoltys.seedvault.transport.requestBackup
|
||||
import java.util.Date
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class BackupWorker(
|
||||
|
@ -48,16 +46,6 @@ class BackupWorker(
|
|||
val workManager = WorkManager.getInstance(appContext)
|
||||
workManager.cancelUniqueWork(UNIQUE_WORK_NAME)
|
||||
}
|
||||
|
||||
fun logWorkInfo(appContext: Context) {
|
||||
val workManager = WorkManager.getInstance(appContext)
|
||||
workManager.getWorkInfosForUniqueWork(UNIQUE_WORK_NAME).get().forEach {
|
||||
Log.e(
|
||||
"BackupWorker", " ${it.state.name} - ${Date(it.nextScheduleTimeMillis)} - " +
|
||||
"runAttempts: ${it.runAttemptCount}"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun doWork(): Result {
|
||||
|
|
Loading…
Reference in a new issue