Capture exception when restart service

This commit is contained in:
J-Jamet
2021-05-31 14:48:59 +02:00
parent fb865af088
commit d309a67416

View File

@@ -280,8 +280,10 @@ open class DatabaseTaskNotificationService : LockNotificationService(), Progress
stopSelf()
} else {
// Restart the service to open lock notification
startService(Intent(applicationContext,
DatabaseTaskNotificationService::class.java))
try {
startService(Intent(applicationContext,
DatabaseTaskNotificationService::class.java))
} catch (e: IllegalStateException) {}
}
}
}