Call code styling

This commit is contained in:
Juha Heinanen
2026-08-03 15:18:15 +03:00
parent 9723be2e0b
commit 6ee6f8fe26

View File

@ -48,15 +48,11 @@ open class Call(val callp: Long, val ua: UserAgent, val peerUri: String, val dir
val focusDtmf: MutableState<Boolean> = mutableStateOf(false) val focusDtmf: MutableState<Boolean> = mutableStateOf(false)
fun add() { fun add() {
synchronized(BaresipService.calls) { synchronized(BaresipService.calls) { BaresipService.calls.add(this) }
BaresipService.calls.add(this)
}
} }
fun remove() { fun remove() {
synchronized(BaresipService.calls) { synchronized(BaresipService.calls) { BaresipService.calls.remove(this) }
BaresipService.calls.remove(this)
}
} }
open fun connect(uri: String): Boolean { 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 { companion object {
fun calls(): ArrayList<Call> { fun calls(): ArrayList<Call> {
synchronized(BaresipService.calls) { synchronized(BaresipService.calls) { return ArrayList(BaresipService.calls) }
return ArrayList(BaresipService.calls)
}
} }
fun ofCallp(callp: Long): Call? { 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 { fun inCall(): Boolean {
synchronized(BaresipService.calls) { synchronized(BaresipService.calls) { return BaresipService.calls.isNotEmpty() }
return BaresipService.calls.isNotEmpty()
}
} }
fun hasTelecomCall(): Boolean { fun hasTelecomCall(): Boolean {