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
No related branches found
No related tags found
No related merge requests found
...@@ -885,10 +885,10 @@ class CallFragment : BaseSupportFragment<CallPresenter, CallView>(), CallView, ...@@ -885,10 +885,10 @@ class CallFragment : BaseSupportFragment<CallPresenter, CallView>(), CallView,
if(callMediaHandlers == null) callMediaHandlers = PluginUtils.getInstalledPlugins(binding.pluginslistContainer.context) if(callMediaHandlers == null) callMediaHandlers = PluginUtils.getInstalledPlugins(binding.pluginslistContainer.context)
pluginsAdapter = PluginsAdapter( pluginsAdapter = PluginsAdapter(
callMediaHandlers!!, mList = callMediaHandlers!!,
object : PluginsAdapter.PluginListItemListener { listener = object : PluginsAdapter.PluginListItemListener {
override fun onPluginItemClicked(pluginDetails: PluginDetails) { override fun onPluginItemClicked(pluginDetails: PluginDetails) {}
}
override fun onPluginEnabled(pluginDetails: PluginDetails) { override fun onPluginEnabled(pluginDetails: PluginDetails) {
pluginDetails.isRunning = !pluginDetails.isRunning pluginDetails.isRunning = !pluginDetails.isRunning
if (!isChoosePluginMode) { if (!isChoosePluginMode) {
...@@ -897,17 +897,20 @@ class CallFragment : BaseSupportFragment<CallPresenter, CallView>(), CallView, ...@@ -897,17 +897,20 @@ class CallFragment : BaseSupportFragment<CallPresenter, CallView>(), CallView,
} else { } else {
if (pluginDetails.isRunning) { if (pluginDetails.isRunning) {
presenter.toggleCallMediaHandler(pluginDetails.handlerId!!, true) presenter.toggleCallMediaHandler(pluginDetails.handlerId!!, true)
} } else {
else {
presenter.toggleCallMediaHandler(pluginDetails.handlerId!!, false) 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() presenter.stopPlugin()
isChoosePluginMode = false isChoosePluginMode = false
} }
} }
} }
} }
}, participantInfo[0].call?.account) },
accountId = if (participantInfo.isNotEmpty()) participantInfo[0].call?.account else null
)
binding.pluginslistContainer.adapter = pluginsAdapter 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