Fixed crash when creating CoreContext from BroadcastReceiver context

This commit is contained in:
Sylvain Berfini 2023-02-28 17:15:24 +01:00
parent 3aedf9be45
commit 76455c1491

View file

@ -33,7 +33,7 @@ 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)
ensureCoreExists(context.applicationContext, false)
val notificationId = intent.getIntExtra(NotificationsManager.INTENT_NOTIF_ID, 0)
Log.i("[Notification Broadcast Receiver] Got notification broadcast for ID [$notificationId]")