mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 16:43:26 +02:00
Android 12 foreground restrictions
This commit is contained in:
@@ -2721,11 +2721,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||
}
|
||||
|
||||
static int getPollInterval(Context context) {
|
||||
if (Helper.isTarget(context, Build.VERSION_CODES.R)) {
|
||||
Boolean ignoring = Helper.isIgnoringOptimizations(context);
|
||||
if (ignoring != null && !ignoring)
|
||||
return 15;
|
||||
}
|
||||
if (Helper.isOptimizing12(context))
|
||||
return (BuildConfig.DEBUG ? 2 : 15);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
return prefs.getInt("poll_interval", 0); // minutes
|
||||
|
||||
Reference in New Issue
Block a user