Ensure Background sync is not stopped when there is an active call, even when the app goes to background.
This commit is contained in:
parent
84158ece37
commit
8d85d047b7
|
@ -189,11 +189,15 @@ class VectorApplication :
|
||||||
fcmHelper.onEnterBackground(activeSessionHolder)
|
fcmHelper.onEnterBackground(activeSessionHolder)
|
||||||
|
|
||||||
if (stopBackgroundSync) {
|
if (stopBackgroundSync) {
|
||||||
Timber.i("App entered background: stop any background sync")
|
if (webRtcCallManager.currentCall.get() == null) {
|
||||||
activeSessionHolder.getSafeActiveSessionAsync {
|
Timber.i("App entered background: stop any background sync")
|
||||||
it?.syncService()?.stopAnyBackgroundSync()
|
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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue