From c832cd9886dd9ae99634a03dd64a90888bcdd820 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Thu, 1 Feb 2024 16:30:15 -0300 Subject: [PATCH] Remove logWorkInfo as some part of it isn't in AOSP version of workmanger It was meant for debugging only anyway --- .../java/com/stevesoltys/seedvault/BackupWorker.kt | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/app/src/main/java/com/stevesoltys/seedvault/BackupWorker.kt b/app/src/main/java/com/stevesoltys/seedvault/BackupWorker.kt index d0352e46..02446162 100644 --- a/app/src/main/java/com/stevesoltys/seedvault/BackupWorker.kt +++ b/app/src/main/java/com/stevesoltys/seedvault/BackupWorker.kt @@ -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 {