mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-19 18:35:34 +00:00
Poll on old Android versions
This commit is contained in:
parent
155ed8d698
commit
0f5e53040d
2 changed files with 5 additions and 1 deletions
|
@ -662,6 +662,9 @@ public class ApplicationEx extends Application
|
|||
else if (version < 1994) {
|
||||
// 2022-10-28 Spamcop blocks Google's addresses
|
||||
editor.putBoolean("blocklist.Spamcop", false);
|
||||
} else if (version < 2011) {
|
||||
if (!prefs.contains("poll_interval"))
|
||||
editor.putInt("poll_interval", 0);
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !BuildConfig.DEBUG)
|
||||
|
|
|
@ -3233,8 +3233,9 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
|||
}
|
||||
|
||||
static int getPollInterval(Context context) {
|
||||
int def = (Build.VERSION.SDK_INT <= Build.VERSION_CODES.O ? 15 : 0);
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
return prefs.getInt("poll_interval", 0); // minutes
|
||||
return prefs.getInt("poll_interval", def); // minutes
|
||||
}
|
||||
|
||||
static long[] getSchedule(Context context) {
|
||||
|
|
Loading…
Add table
Reference in a new issue