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() stopSelf()
} else { } else {
// Restart the service to open lock notification // Restart the service to open lock notification
startService(Intent(applicationContext, try {
DatabaseTaskNotificationService::class.java)) startService(Intent(applicationContext,
DatabaseTaskNotificationService::class.java))
} catch (e: IllegalStateException) {}
} }
} }
} }