Allow manual sync when polling

This commit is contained in:
M66B 2019-04-26 13:35:10 +02:00
parent 8082fffbf7
commit 3a2a369aff
1 changed files with 2 additions and 1 deletions

View File

@ -1312,7 +1312,8 @@ public class ServiceSynchronize extends LifecycleService {
static void process(Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean enabled = prefs.getBoolean("enabled", true);
if (!enabled)
int pollInterval = prefs.getInt("poll_interval", 0);
if (!enabled || pollInterval > 0)
onshot(context);
}