Ensure foreground notification is always displayed

This commit is contained in:
Benoit Marty 2020-01-09 15:09:37 +01:00
parent dd8c908dc7
commit 47e3b8ec46
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,6 @@ abstract class SyncService : Service() {
taskExecutor = sessionComponent.taskExecutor() taskExecutor = sessionComponent.taskExecutor()
coroutineDispatchers = sessionComponent.coroutineDispatchers() coroutineDispatchers = sessionComponent.coroutineDispatchers()
backgroundDetectionObserver = matrix.backgroundDetectionObserver backgroundDetectionObserver = matrix.backgroundDetectionObserver
onStart(isInitialSync)
if (isRunning.get()) { if (isRunning.get()) {
Timber.i("Received a start while was already syncing... ignore") Timber.i("Received a start while was already syncing... ignore")
} else { } else {
@ -79,6 +78,7 @@ abstract class SyncService : Service() {
} }
} }
} }
onStart(isInitialSync)
// No intent just start the service, an alarm will should call with intent // No intent just start the service, an alarm will should call with intent
return START_STICKY return START_STICKY
} }