mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Sync: use foreground service on every android version
This commit is contained in:
parent
833a5a37a2
commit
037bf45884
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user