mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 05:44:51 +02:00
Switch to polling if battery optimizations enabled on Android 12+
This commit is contained in:
@@ -23,6 +23,7 @@ import android.app.Dialog;
|
||||
import android.app.TimePickerDialog;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.text.format.DateFormat;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -449,7 +450,7 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
|
||||
swEnabled.setChecked(prefs.getBoolean("enabled", true));
|
||||
swOptimize.setChecked(prefs.getBoolean("auto_optimize", false));
|
||||
|
||||
int pollInterval = ServiceSynchronize.getPollInterval(getContext());
|
||||
int pollInterval = prefs.getInt("poll_interval", 0);
|
||||
int[] pollIntervalValues = getResources().getIntArray(R.array.pollIntervalValues);
|
||||
for (int pos = 0; pos < pollIntervalValues.length; pos++)
|
||||
if (pollIntervalValues[pos] == pollInterval) {
|
||||
|
||||
Reference in New Issue
Block a user