Skip to content

Commit 8d85d04

Browse files
committed
Ensure Background sync is not stopped when there is an active call, even when the app goes to background.
1 parent 84158ec commit 8d85d04

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

vector-app/src/main/java/im/vector/app/VectorApplication.kt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,15 @@ class VectorApplication :
189189
fcmHelper.onEnterBackground(activeSessionHolder)
190190

191191
if (stopBackgroundSync) {
192-
Timber.i("App entered background: stop any background sync")
193-
activeSessionHolder.getSafeActiveSessionAsync {
194-
it?.syncService()?.stopAnyBackgroundSync()
192+
if (webRtcCallManager.currentCall.get() == null) {
193+
Timber.i("App entered background: stop any background sync")
194+
activeSessionHolder.getSafeActiveSessionAsync {
195+
it?.syncService()?.stopAnyBackgroundSync()
196+
}
197+
stopBackgroundSync = false
198+
} else {
199+
Timber.i("App entered background: there is an active call do not stop background sync")
195200
}
196-
stopBackgroundSync = false
197201
}
198202
}
199203
})

0 commit comments

Comments
 (0)