mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed crash when using chat message notification action after Core has been destroyed
This commit is contained in:
parent
76837ad005
commit
b4c1b73e4a
1 changed files with 4 additions and 0 deletions
|
|
@ -25,12 +25,16 @@ import android.content.BroadcastReceiver
|
|||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||
import org.linphone.LinphoneApplication.Companion.ensureCoreExists
|
||||
import org.linphone.core.Call
|
||||
import org.linphone.core.Core
|
||||
import org.linphone.core.tools.Log
|
||||
|
||||
class NotificationBroadcastReceiver : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
Log.i("[Notification Broadcast Receiver] Ensuring Core exists")
|
||||
ensureCoreExists(context, false)
|
||||
|
||||
val notificationId = intent.getIntExtra(NotificationsManager.INTENT_NOTIF_ID, 0)
|
||||
Log.i("[Notification Broadcast Receiver] Got notification broadcast for ID [$notificationId]")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue