Use baresip's missed call notification also for missed mobile calls

Added caller's contact name (is available) to Connection Service connection
This commit is contained in:
Juha Heinanen
2026-07-16 15:25:15 +03:00
parent c7060583cc
commit 278595a5a9
4 changed files with 33 additions and 17 deletions
@@ -1368,6 +1368,19 @@ object Utils {
return file
}
@SuppressLint("MissingPermission")
fun cancelMissedCallsNotification(ctx: Context) {
val telecom = ctx.getSystemService(TelecomManager::class.java)
try {
telecom.cancelMissedCallsNotification()
Log.d(TAG, "cancelMissedCallsNotification() succeeded")
} catch (e: SecurityException) {
Log.w(TAG, "Cannot clear missed call notification: $e")
} catch (e: Exception) {
Log.e(TAG, "Unexpected failure clearing missed call notification", e)
}
}
@RequiresApi(29)
fun pstnAccountHandle(ctx: Context): PhoneAccountHandle? {
val roleManager = ctx.getSystemService(ROLE_SERVICE) as RoleManager