Improved checking if there already is an active call

This commit is contained in:
Juha Heinanen
2026-04-02 09:12:07 +03:00
parent d20b1adcc2
commit f64e1bd982
3 changed files with 13 additions and 35 deletions
@@ -2061,7 +2061,7 @@ private fun makeCall(ctx: Context, viewModel: ViewModel, uriText: String, confer
alertMessage.value = String.format(ctx.getString(R.string.invalid_sip_or_tel_uri), uri)
showAlert.value = true
}
else if (Call.calls().any { it.ua.account.aor != ua.account.aor })
else if (Call.isAnyCallActive(ctx))
Toast.makeText(ctx, R.string.call_already_active, Toast.LENGTH_SHORT).show()
else {
val tm = ctx.getSystemService(Context.TELECOM_SERVICE) as android.telecom.TelecomManager