mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Prevent crash if NotificationManager throws an exception
This commit is contained in:
parent
05e090d867
commit
b8821101ef
1 changed files with 5 additions and 1 deletions
|
|
@ -287,7 +287,11 @@ class NotificationsManager(private val context: Context) {
|
|||
}
|
||||
|
||||
Log.i("[Notifications Manager] Notifying [$id] with tag [$tag]")
|
||||
notificationManager.notify(tag, id, notification)
|
||||
try {
|
||||
notificationManager.notify(tag, id, notification)
|
||||
} catch (iae: IllegalArgumentException) {
|
||||
Log.e("[Notifications Manager] Exception occurred: $iae")
|
||||
}
|
||||
}
|
||||
|
||||
fun cancel(id: Int, tag: String? = null) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue