Added possibility to save recording and delete call from history

This commit is contained in:
Juha Heinanen
2025-12-07 02:58:14 +02:00
parent 673b25d6cd
commit 5a5c520539
5 changed files with 249 additions and 119 deletions
@@ -50,6 +50,18 @@ class CallHistoryNew(val aor: String, val peerUri: String, val direction: String
save()
}
fun remove(startTime: GregorianCalendar?, stopTime: GregorianCalendar) {
val iterator = BaresipService.callHistory.iterator()
while (iterator.hasNext()) {
val h = iterator.next()
if (h.startTime == startTime && h.stopTime == stopTime) {
deleteRecordingFiles(h.recording)
iterator.remove()
}
}
save()
}
fun save() {
Log.d(TAG, "Saving history of ${BaresipService.callHistory.size} calls")
val file = File(BaresipService.filesPath + "/call_history")