initialize rootEglBase earlier (hopefully fixes crash)

There was a report that the app crashed after coming back from PIP mode.

And i once saw in logs

"call to OpenGL ES API with no current context (logged once per thread)"

By initializing rootEglBase very early there is a chance this fixes these issues.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2025-05-30 15:34:20 +02:00
parent 89d51837b7
commit c8b33a380a
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B

View File

@ -376,6 +376,8 @@ class CallActivity : CallBaseActivity() {
Log.d(TAG, "onCreate")
super.onCreate(savedInstanceState)
sharedApplication!!.componentApplication.inject(this)
rootEglBase = EglBase.create()
binding = CallActivityBinding.inflate(layoutInflater)
setContentView(binding!!.root)
hideNavigationIfNoPipAvailable()
@ -765,7 +767,6 @@ class CallActivity : CallBaseActivity() {
}
private fun basicInitialization() {
rootEglBase = EglBase.create()
createCameraEnumerator()
// Create a new PeerConnectionFactory instance.