diff --git a/vector-app/src/main/java/im/vector/app/VectorApplication.kt b/vector-app/src/main/java/im/vector/app/VectorApplication.kt index deb3d8d3aa..7b41c12773 100644 --- a/vector-app/src/main/java/im/vector/app/VectorApplication.kt +++ b/vector-app/src/main/java/im/vector/app/VectorApplication.kt @@ -189,11 +189,15 @@ class VectorApplication : fcmHelper.onEnterBackground(activeSessionHolder) if (stopBackgroundSync) { - Timber.i("App entered background: stop any background sync") - activeSessionHolder.getSafeActiveSessionAsync { - it?.syncService()?.stopAnyBackgroundSync() + if (webRtcCallManager.currentCall.get() == null) { + Timber.i("App entered background: stop any background sync") + activeSessionHolder.getSafeActiveSessionAsync { + it?.syncService()?.stopAnyBackgroundSync() + } + stopBackgroundSync = false + } else { + Timber.i("App entered background: there is an active call do not stop background sync") } - stopBackgroundSync = false } } })