Call code styling
This commit is contained in:
@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user