Prevent Service crash
This commit is contained in:
parent
ea39ea82e7
commit
4a2e31f16d
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue