Skip to content

Commit

Permalink
feat(SyncMediaWorker): change notif to deferred
Browse files Browse the repository at this point in the history
to avoid disturbances in auto sync
  • Loading branch information
BrayanDSO committed Mar 28, 2024
1 parent a9c0534 commit a3dc2cc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class SyncMediaWorker(
setContentTitle(applicationContext.getString(R.string.syncing_media))
setOngoing(true)
setProgress(0, 0, true)
foregroundServiceBehavior = NotificationCompat.FOREGROUND_SERVICE_IMMEDIATE
foregroundServiceBehavior = NotificationCompat.FOREGROUND_SERVICE_DEFERRED
}
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
ForegroundInfo(NotificationId.SYNC_MEDIA, notification, ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC)
Expand Down

0 comments on commit a3dc2cc

Please sign in to comment.