mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed another foreground service not started crash
This commit is contained in:
parent
cfe00d1b61
commit
10c68a2c28
1 changed files with 6 additions and 1 deletions
|
|
@ -611,6 +611,7 @@ class NotificationsManager @MainThread constructor(private val context: Context)
|
|||
val importance = channel?.importance ?: NotificationManagerCompat.IMPORTANCE_NONE
|
||||
if (importance == NotificationManagerCompat.IMPORTANCE_NONE) {
|
||||
Log.e("$TAG Calls channel has been disabled, can't start foreground service!")
|
||||
stopInCallCallForegroundService()
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -618,12 +619,16 @@ class NotificationsManager @MainThread constructor(private val context: Context)
|
|||
val notificationId = notifiable.notificationId
|
||||
val notification = if (notificationsMap.containsKey(notificationId)) {
|
||||
notificationsMap[notificationId]
|
||||
} else if (notificationsMap.containsKey(INCOMING_CALL_ID)) {
|
||||
notificationsMap[INCOMING_CALL_ID]
|
||||
} else {
|
||||
null
|
||||
}
|
||||
|
||||
if (notification == null) {
|
||||
Log.w("$TAG No existing notification found for current Call, aborting")
|
||||
Log.w(
|
||||
"$TAG No existing notification (ID [$notificationId]) found for current call [${call.remoteAddress.asStringUriOnly()}], aborting"
|
||||
)
|
||||
stopInCallCallForegroundService()
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue