Update status notification when call is answered

Turn proximity sensing off immediately when last call is closed
This commit is contained in:
Juha Heinanen
2026-05-11 18:59:13 +03:00
parent eed03f3787
commit c70c04bc5a
@@ -538,6 +538,7 @@ class BaresipService: Service() {
setCallVolume() setCallVolume()
proximitySensing(proximitySensing) proximitySensing(proximitySensing)
call?.answer() call?.answer()
updateStatusNotification()
} }
"Call Reject" -> { "Call Reject" -> {
@@ -1070,6 +1071,8 @@ class BaresipService: Service() {
if (call != null) { if (call != null) {
call.terminated.value = true call.terminated.value = true
call.remove() call.remove()
if (!Call.inCall())
proximitySensing(false)
} }
ConnectionService.lastDisconnectTime = System.currentTimeMillis() ConnectionService.lastDisconnectTime = System.currentTimeMillis()
val connection = ConnectionService.connections[callp] val connection = ConnectionService.connections[callp]
@@ -2236,7 +2239,6 @@ class BaresipService: Service() {
} }
if (!Call.hasTelecomCall()) if (!Call.hasTelecomCall())
resetCallVolume() resetCallVolume()
proximitySensing(false)
} }
} }
cleanupRunnable = runnable cleanupRunnable = runnable