Refactoring

This commit is contained in:
M66B
2021-05-01 19:02:39 +02:00
parent 9bbfd69c8d
commit ec31b6ce6c
4 changed files with 18 additions and 8 deletions

View File

@@ -154,7 +154,7 @@ public class EntityAccount extends EntityOrder implements Serializable {
boolean isTransient(Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean enabled = prefs.getBoolean("enabled", true);
int pollInterval = prefs.getInt("poll_interval", ServiceSynchronize.DEFAULT_POLL_INTERVAL);
int pollInterval = ServiceSynchronize.getPollInterval(context);
return (!enabled || this.ondemand || (pollInterval > 0 && !this.poll_exempted));
}