Trying to prevent crash when CallActivity is destroyed after the Core
This commit is contained in:
parent
0e3c82b519
commit
9cf50d3c06
1 changed files with 5 additions and 2 deletions
|
@ -41,6 +41,7 @@ import org.linphone.activities.voip.viewmodels.ControlsViewModel
|
|||
import org.linphone.activities.voip.viewmodels.StatisticsListViewModel
|
||||
import org.linphone.compatibility.Compatibility
|
||||
import org.linphone.core.Call
|
||||
import org.linphone.core.GlobalState
|
||||
import org.linphone.core.tools.Log
|
||||
import org.linphone.databinding.VoipActivityBinding
|
||||
import org.linphone.mediastream.Version
|
||||
|
@ -240,8 +241,10 @@ class CallActivity : ProximitySensorActivity() {
|
|||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
coreContext.core.nativeVideoWindowId = null
|
||||
coreContext.core.nativePreviewWindowId = null
|
||||
if (coreContext.core.globalState != GlobalState.Off) {
|
||||
coreContext.core.nativeVideoWindowId = null
|
||||
coreContext.core.nativePreviewWindowId = null
|
||||
}
|
||||
|
||||
super.onDestroy()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue