Show storage backup notification immediately
This commit is contained in:
parent
97398f1c5c
commit
b184f208c4
1 changed files with 2 additions and 0 deletions
|
@ -9,6 +9,7 @@ import android.content.Context
|
||||||
import androidx.annotation.DrawableRes
|
import androidx.annotation.DrawableRes
|
||||||
import androidx.annotation.StringRes
|
import androidx.annotation.StringRes
|
||||||
import androidx.core.app.NotificationCompat
|
import androidx.core.app.NotificationCompat
|
||||||
|
import androidx.core.app.NotificationCompat.FOREGROUND_SERVICE_IMMEDIATE
|
||||||
import androidx.core.app.NotificationCompat.PRIORITY_DEFAULT
|
import androidx.core.app.NotificationCompat.PRIORITY_DEFAULT
|
||||||
import org.calyxos.backup.storage.R
|
import org.calyxos.backup.storage.R
|
||||||
|
|
||||||
|
@ -143,6 +144,7 @@ internal class Notifications(private val context: Context) {
|
||||||
setShowWhen(false)
|
setShowWhen(false)
|
||||||
setWhen(System.currentTimeMillis())
|
setWhen(System.currentTimeMillis())
|
||||||
setProgress(expected, transferred, expected == 0)
|
setProgress(expected, transferred, expected == 0)
|
||||||
|
foregroundServiceBehavior = FOREGROUND_SERVICE_IMMEDIATE
|
||||||
priority = PRIORITY_DEFAULT
|
priority = PRIORITY_DEFAULT
|
||||||
}.build()
|
}.build()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue