From 1437d9acc61e45cc1930da8c99e76ed34d70e7c8 Mon Sep 17 00:00:00 2001 From: Juha Heinanen Date: Wed, 28 Sep 2022 10:27:22 +0300 Subject: [PATCH] Minor code improvements --- app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt b/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt index f0c23e7a..39ea1f3f 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt @@ -591,8 +591,8 @@ class BaresipService: Service() { Log.d(TAG, "got uaEvent $event/$aor/$callp") val call = Call.ofCallp(callp) - if (call == null && callp != 0L && ev[0] != "call incoming" && ev[0] != "call rejected" && - ev[0] != "call closed") { + if (call == null && callp != 0L && + !setOf("call incoming", "call rejected", "call closed").contains(ev[0])) { Log.w(TAG, "uaEvent $event did not find call $callp") return } @@ -954,8 +954,7 @@ class BaresipService: Service() { if (reason[0].isDigit()) toast("${getString(R.string.call_failed)}: $reason") else - toast("${getString(R.string.call_closed)}: " + - "$reason ${Api.call_peer_uri(callp)}") + toast("${getString(R.string.call_closed)}: ${Api.call_peer_uri(callp)}: $reason") } } }