From 47e3b8ec46140dddbda179a671d3fa8795c5afd6 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 9 Jan 2020 15:09:37 +0100 Subject: [PATCH] Ensure foreground notification is always displayed --- .../matrix/android/internal/session/sync/job/SyncService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }