File tree 2 files changed +2
-0
lines changed
app/src/main/java/com/orgzly/android
2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ object SyncRunner {
31
31
val workManager = WorkManager .getInstance(App .getAppContext())
32
32
33
33
val syncWorker = OneTimeWorkRequestBuilder <SyncWorker >()
34
+ .setExpedited(OutOfQuotaPolicy .RUN_AS_NON_EXPEDITED_WORK_REQUEST )
34
35
.setInputData(workDataOf(AUTO_SYNC_DATA to autoSync))
35
36
.build()
36
37
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ object SyncNotifications {
38
38
39
39
val builder = NotificationCompat .Builder (context, NotificationChannels .SYNC_PROGRESS )
40
40
.setOngoing(true )
41
+ .setForegroundServiceBehavior(NotificationCompat .FOREGROUND_SERVICE_IMMEDIATE )
41
42
.setSmallIcon(R .drawable.ic_sync)
42
43
.setContentTitle(context.getString(R .string.syncing_in_progress))
43
44
.setColor(ContextCompat .getColor(context, R .color.notification))
You can’t perform that action at this time.
0 commit comments