Skip to content
Snippets Groups Projects
Verified Commit 30dc83a8 authored by Torsten Grote's avatar Torsten Grote
Browse files

Fix warnings

parent 94d4d2d2
No related branches found
No related tags found
1 merge request!164Add cancel button in STARTING state
...@@ -26,6 +26,8 @@ import android.content.Intent ...@@ -26,6 +26,8 @@ import android.content.Intent
import android.content.Intent.FLAG_ACTIVITY_NEW_TASK import android.content.Intent.FLAG_ACTIVITY_NEW_TASK
import android.content.IntentFilter import android.content.IntentFilter
import android.os.IBinder import android.os.IBinder
import androidx.core.app.ServiceCompat
import androidx.core.app.ServiceCompat.stopForeground
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import dagger.hilt.android.AndroidEntryPoint import dagger.hilt.android.AndroidEntryPoint
import org.briarproject.mailbox.R import org.briarproject.mailbox.R
...@@ -156,7 +158,7 @@ class MailboxService : Service() { ...@@ -156,7 +158,7 @@ class MailboxService : Service() {
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
LOG.info("Destroyed") LOG.info("Destroyed")
stopForeground(true) stopForeground(this, ServiceCompat.STOP_FOREGROUND_REMOVE)
if (receiver != null) unregisterReceiver(receiver) if (receiver != null) unregisterReceiver(receiver)
if (started) { if (started) {
androidExecutor.runOnBackgroundThread { androidExecutor.runOnBackgroundThread {
......
...@@ -25,6 +25,7 @@ import android.graphics.Bitmap ...@@ -25,6 +25,7 @@ import android.graphics.Bitmap
import androidx.annotation.StringRes import androidx.annotation.StringRes
import androidx.annotation.UiThread import androidx.annotation.UiThread
import dagger.hilt.android.qualifiers.ApplicationContext import dagger.hilt.android.qualifiers.ApplicationContext
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.Dispatchers.IO import kotlinx.coroutines.Dispatchers.IO
import kotlinx.coroutines.Dispatchers.Main import kotlinx.coroutines.Dispatchers.Main
import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.GlobalScope
...@@ -60,6 +61,7 @@ import javax.inject.Singleton ...@@ -60,6 +61,7 @@ import javax.inject.Singleton
import kotlin.math.min import kotlin.math.min
@Singleton @Singleton
@OptIn(DelicateCoroutinesApi::class)
class StatusManager @Inject constructor( class StatusManager @Inject constructor(
@ApplicationContext private val context: Context, @ApplicationContext private val context: Context,
lifecycleManager: LifecycleManager, lifecycleManager: LifecycleManager,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment