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) {
|
||||||
|
if (webRtcCallManager.currentCall.get() == null) {
|
||||||
Timber.i("App entered background: stop any background sync")
|
Timber.i("App entered background: stop any background sync")
|
||||||
activeSessionHolder.getSafeActiveSessionAsync {
|
activeSessionHolder.getSafeActiveSessionAsync {
|
||||||
it?.syncService()?.stopAnyBackgroundSync()
|
it?.syncService()?.stopAnyBackgroundSync()
|
||||||
}
|
}
|
||||||
stopBackgroundSync = false
|
stopBackgroundSync = false
|
||||||
|
} else {
|
||||||
|
Timber.i("App entered background: there is an active call do not stop background sync")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue