- Added Call remove() method.

This commit is contained in:
Juha Heinanen
2020-05-08 09:51:31 +03:00
parent 572c38c0cc
commit d169991687
2 changed files with 5 additions and 1 deletions
@@ -731,7 +731,7 @@ class BaresipService: Service() {
} }
Log.d(LOG_TAG, "AoR $aor call $callp is closed") Log.d(LOG_TAG, "AoR $aor call $callp is closed")
stopRinging() stopRinging()
calls.remove(call) call.remove()
if (Call.calls().size == 0) { if (Call.calls().size == 0) {
resetCallVolume() resetCallVolume()
if (am.mode != AudioManager.MODE_NORMAL) if (am.mode != AudioManager.MODE_NORMAL)
@@ -15,6 +15,10 @@ class Call(val callp: String, val ua: UserAgent, val peerURI: String, val dir: S
BaresipService.calls.add(this) BaresipService.calls.add(this)
} }
fun remove() {
BaresipService.calls.remove(this)
}
fun connect(uri: String): Int { fun connect(uri: String): Int {
return call_connect(callp, uri) return call_connect(callp, uri)
} }