diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/sync/job/SyncService.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/sync/job/SyncService.kt index 308e92b912..724b0e1360 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/sync/job/SyncService.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/sync/job/SyncService.kt @@ -69,7 +69,6 @@ abstract class SyncService : Service() { taskExecutor = sessionComponent.taskExecutor() coroutineDispatchers = sessionComponent.coroutineDispatchers() backgroundDetectionObserver = matrix.backgroundDetectionObserver - onStart(isInitialSync) if (isRunning.get()) { Timber.i("Received a start while was already syncing... ignore") } else { @@ -79,6 +78,7 @@ abstract class SyncService : Service() { } } } + onStart(isInitialSync) // No intent just start the service, an alarm will should call with intent return START_STICKY }