Fixed bug in checking if call already exists

This commit is contained in:
Juha Heinanen
2026-04-02 19:04:08 +03:00
parent eb52a1a8d3
commit 91f28f03df
5 changed files with 27 additions and 17 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.isAnyCallActive(ctx))
else if (Utils.isPSTNCallActive(ctx) || Call.calls().any { it.ua.account.aor != ua.account.aor } )
Toast.makeText(ctx, R.string.call_already_active, Toast.LENGTH_SHORT).show()
else {
val tm = ctx.getSystemService(Context.TELECOM_SERVICE) as android.telecom.TelecomManager