diff --git a/app/src/main/java/org/linphone/core/CoreService.kt b/app/src/main/java/org/linphone/core/CoreService.kt index 94c16eb5d..01eb25f57 100644 --- a/app/src/main/java/org/linphone/core/CoreService.kt +++ b/app/src/main/java/org/linphone/core/CoreService.kt @@ -32,8 +32,8 @@ class CoreService : CoreService() { Log.i("[Service] Created") } - override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int { - if (intent.extras?.get("StartForeground") == true) { + override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { + if (intent?.extras?.get("StartForeground") == true) { Log.i("[Service] Starting as foreground") coreContext.notificationsManager.startForeground(this, true) }