Skip to content

Commit

Permalink
Remove logWorkInfo as some part of it isn't in AOSP version of workma…
Browse files Browse the repository at this point in the history
…nger

It was meant for debugging only anyway
  • Loading branch information
grote committed Feb 1, 2024
1 parent 7325a91 commit e5be542
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions app/src/main/java/com/stevesoltys/seedvault/BackupWorker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit e5be542

Please sign in to comment.