From c76e15e4830d36dd99f3aed5b5cd52e3b1e40f4b Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Fri, 27 May 2022 16:05:23 +0200 Subject: [PATCH] Try to prevent foreground service notification to stay visible after call ends --- .../java/org/linphone/notifications/NotificationsManager.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/org/linphone/notifications/NotificationsManager.kt b/app/src/main/java/org/linphone/notifications/NotificationsManager.kt index 7ccc2a109..44e2970ff 100644 --- a/app/src/main/java/org/linphone/notifications/NotificationsManager.kt +++ b/app/src/main/java/org/linphone/notifications/NotificationsManager.kt @@ -191,6 +191,11 @@ class NotificationsManager(private val context: Context) { } } } + + override fun onLastCallEnded(core: Core) { + Log.i("[Notifications Manager] Last call ended, make sure foreground service is stopped and notification removed") + stopCallForeground() + } } val chatListener: ChatMessageListener = object : ChatMessageListenerStub() {