diff --git a/app/src/main/kotlin/com/tutpro/baresip/Call.kt b/app/src/main/kotlin/com/tutpro/baresip/Call.kt index cc78e675..ac113a08 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/Call.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/Call.kt @@ -48,15 +48,11 @@ open class Call(val callp: Long, val ua: UserAgent, val peerUri: String, val dir val focusDtmf: MutableState = mutableStateOf(false) fun add() { - synchronized(BaresipService.calls) { - BaresipService.calls.add(this) - } + synchronized(BaresipService.calls) { BaresipService.calls.add(this) } } fun remove() { - synchronized(BaresipService.calls) { - BaresipService.calls.remove(this) - } + synchronized(BaresipService.calls) { BaresipService.calls.remove(this) } } open fun connect(uri: String): Boolean { @@ -234,9 +230,7 @@ open class Call(val callp: Long, val ua: UserAgent, val peerUri: String, val dir companion object { fun calls(): ArrayList { - synchronized(BaresipService.calls) { - return ArrayList(BaresipService.calls) - } + synchronized(BaresipService.calls) { return ArrayList(BaresipService.calls) } } fun ofCallp(callp: Long): Call? { @@ -256,9 +250,7 @@ open class Call(val callp: Long, val ua: UserAgent, val peerUri: String, val dir } fun inCall(): Boolean { - synchronized(BaresipService.calls) { - return BaresipService.calls.isNotEmpty() - } + synchronized(BaresipService.calls) { return BaresipService.calls.isNotEmpty() } } fun hasTelecomCall(): Boolean {