Skip to content

Commit e997610

Browse files
committed
Add documentation from PR description
1 parent c2be977 commit e997610

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

vector/src/main/java/im/vector/app/features/settings/BackgroundSyncMode.kt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,26 @@
1616

1717
package im.vector.app.features.settings
1818

19+
/**
20+
* Different strategies for Background sync, only applicable to F-Droid version of the app
21+
*/
1922
enum class BackgroundSyncMode {
23+
/**
24+
* In this mode background syncs are scheduled via Workers, meaning that the system will have control on the periodicity
25+
* of syncs when battery is low or when the phone is idle (sync will occur in allowed maintenance windows). After completion
26+
* the sync work will schedule another one.
27+
*/
2028
FDROID_BACKGROUND_SYNC_MODE_FOR_BATTERY,
29+
30+
/**
31+
* This mode requires the app to be exempted from battery optimization. Alarms will be launched and will wake up the app
32+
* in order to perform the background sync as a foreground service. After completion the service will schedule another alarm
33+
*/
2134
FDROID_BACKGROUND_SYNC_MODE_FOR_REALTIME,
35+
36+
/**
37+
* The app won't sync in background
38+
*/
2239
FDROID_BACKGROUND_SYNC_MODE_DISABLED;
2340

2441
companion object {

0 commit comments

Comments
 (0)