From c802e7e4a24eed739e243111db766ec57fd19356 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 12 Jan 2023 08:55:34 +0100 Subject: [PATCH] lints --- .../java/info/nightscout/core/utils/worker/LoggingWorker.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/utils/src/main/java/info/nightscout/core/utils/worker/LoggingWorker.kt b/core/utils/src/main/java/info/nightscout/core/utils/worker/LoggingWorker.kt index cd39a12986..c006be8038 100644 --- a/core/utils/src/main/java/info/nightscout/core/utils/worker/LoggingWorker.kt +++ b/core/utils/src/main/java/info/nightscout/core/utils/worker/LoggingWorker.kt @@ -12,12 +12,13 @@ import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.withContext import javax.inject.Inject -abstract class LoggingWorker(context: Context, workerParams: WorkerParameters, val dispatcher: CoroutineDispatcher) : CoroutineWorker(context, workerParams) { +abstract class LoggingWorker(context: Context, workerParams: WorkerParameters, private val dispatcher: CoroutineDispatcher) : CoroutineWorker(context, workerParams) { @Inject lateinit var aapsLogger: AAPSLogger @Inject lateinit var fabricPrivacy: FabricPrivacy init { + @Suppress("LeakingThis") (context.applicationContext as HasAndroidInjector).androidInjector().inject(this) }