Sync: use foreground service on every android version

This commit is contained in:
ganfra 2019-12-27 17:09:57 +01:00
parent 833a5a37a2
commit 037bf45884
1 changed files with 6 additions and 8 deletions

View File

@ -45,7 +45,6 @@ class VectorSyncService : SyncService() {
}
override fun onStart(isInitialSync: Boolean) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val notificationSubtitleRes = if (isInitialSync) {
R.string.notification_initial_sync
} else {
@ -54,7 +53,6 @@ class VectorSyncService : SyncService() {
val notification = notificationUtils.buildForegroundServiceNotification(notificationSubtitleRes, false)
startForeground(NotificationUtils.NOTIFICATION_ID_FOREGROUND_SERVICE, notification)
}
}
override fun onRescheduleAsked(userId: String, isInitialSync: Boolean, delay: Long) {
reschedule(userId, delay)