Skip to content
Snippets Groups Projects
Commit c70c4563 authored by Pierre Nicolas's avatar Pierre Nicolas :joy: Committed by Adrien Béraud
Browse files

call: prevent initIncoming action flow to crash

First shot to prevent it to crash.
GitLab: #1405

Change-Id: I0e495e2ca34aa3eccf2827862dc0da6d4aa0f849
parent a2f49b30
Branches
Tags
No related merge requests found
......@@ -885,10 +885,10 @@ class CallFragment : BaseSupportFragment<CallPresenter, CallView>(), CallView,
if(callMediaHandlers == null) callMediaHandlers = PluginUtils.getInstalledPlugins(binding.pluginslistContainer.context)
pluginsAdapter = PluginsAdapter(
callMediaHandlers!!,
object : PluginsAdapter.PluginListItemListener {
override fun onPluginItemClicked(pluginDetails: PluginDetails) {
}
mList = callMediaHandlers!!,
listener = object : PluginsAdapter.PluginListItemListener {
override fun onPluginItemClicked(pluginDetails: PluginDetails) {}
override fun onPluginEnabled(pluginDetails: PluginDetails) {
pluginDetails.isRunning = !pluginDetails.isRunning
if (!isChoosePluginMode) {
......@@ -897,17 +897,20 @@ class CallFragment : BaseSupportFragment<CallPresenter, CallView>(), CallView,
} else {
if (pluginDetails.isRunning) {
presenter.toggleCallMediaHandler(pluginDetails.handlerId!!, true)
}
else {
} else {
presenter.toggleCallMediaHandler(pluginDetails.handlerId!!, false)
for(handler in callMediaHandlers!!) if (handler.isRunning) break else {
for (handler in callMediaHandlers!!)
if (handler.isRunning) break
else {
presenter.stopPlugin()
isChoosePluginMode = false
}
}
}
}
}, participantInfo[0].call?.account)
},
accountId = if (participantInfo.isNotEmpty()) participantInfo[0].call?.account else null
)
binding.pluginslistContainer.adapter = pluginsAdapter
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment