mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Always use new foreground service utils.
This commit is contained in:
committed by
Cody Henthorne
parent
7b13550086
commit
23804046c6
@@ -3,10 +3,10 @@ package org.thoughtcrime.securesms.gcm
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import androidx.core.content.ContextCompat
|
||||
import org.signal.core.util.concurrent.SignalExecutors
|
||||
import org.signal.core.util.logging.Log
|
||||
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies
|
||||
import org.thoughtcrime.securesms.jobs.ForegroundServiceUtil
|
||||
import org.thoughtcrime.securesms.jobs.PushNotificationReceiveJob
|
||||
import org.thoughtcrime.securesms.messages.RestStrategy
|
||||
import org.thoughtcrime.securesms.util.concurrent.SerialMonoLifoExecutor
|
||||
@@ -48,7 +48,7 @@ object FcmFetchManager {
|
||||
try {
|
||||
if (foreground) {
|
||||
Log.i(TAG, "Starting in the foreground.")
|
||||
ContextCompat.startForegroundService(context, Intent(context, FcmFetchForegroundService::class.java))
|
||||
ForegroundServiceUtil.startWhenCapableOrThrow(context, Intent(context, FcmFetchForegroundService::class.java))
|
||||
startedForeground = true
|
||||
} else {
|
||||
Log.i(TAG, "Starting in the background.")
|
||||
|
||||
Reference in New Issue
Block a user