mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-27 19:36:21 +00:00
Make sure foreground services notifications ID are re-set when service is destroyed
This commit is contained in:
parent
ae80e45e1c
commit
2ba54f085d
1 changed files with 3 additions and 2 deletions
|
|
@ -484,6 +484,7 @@ class NotificationsManager
|
||||||
fun onInCallServiceDestroyed() {
|
fun onInCallServiceDestroyed() {
|
||||||
Log.i("$TAG Service has been destroyed")
|
Log.i("$TAG Service has been destroyed")
|
||||||
inCallService = null
|
inCallService = null
|
||||||
|
currentInCallServiceNotificationId = -1
|
||||||
}
|
}
|
||||||
|
|
||||||
@MainThread
|
@MainThread
|
||||||
|
|
@ -768,10 +769,10 @@ class NotificationsManager
|
||||||
)
|
)
|
||||||
service.stopForeground(STOP_FOREGROUND_REMOVE)
|
service.stopForeground(STOP_FOREGROUND_REMOVE)
|
||||||
service.stopSelf()
|
service.stopSelf()
|
||||||
currentInCallServiceNotificationId = -1
|
|
||||||
} else {
|
} else {
|
||||||
Log.w("$TAG Can't stop foreground Service & notif, no Service was found")
|
Log.w("$TAG Can't stop foreground Service & notif, no Service was found")
|
||||||
}
|
}
|
||||||
|
currentInCallServiceNotificationId = -1
|
||||||
}
|
}
|
||||||
|
|
||||||
@WorkerThread
|
@WorkerThread
|
||||||
|
|
@ -1500,12 +1501,12 @@ class NotificationsManager
|
||||||
)
|
)
|
||||||
service.stopForeground(STOP_FOREGROUND_REMOVE)
|
service.stopForeground(STOP_FOREGROUND_REMOVE)
|
||||||
service.stopSelf()
|
service.stopSelf()
|
||||||
currentKeepAliveThirdPartyAccountsForegroundServiceNotificationId = -1
|
|
||||||
} else {
|
} else {
|
||||||
Log.w(
|
Log.w(
|
||||||
"$TAG Can't stop keep alive for third party accounts foreground Service & notif, no Service was found"
|
"$TAG Can't stop keep alive for third party accounts foreground Service & notif, no Service was found"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
currentKeepAliveThirdPartyAccountsForegroundServiceNotificationId = -1
|
||||||
}
|
}
|
||||||
|
|
||||||
@MainThread
|
@MainThread
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue