|
|
|
@ -19,6 +19,8 @@ package eu.faircode.email;
|
|
|
|
|
Copyright 2018-2021 by Marcel Bokhorst (M66B)
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import static android.os.Process.THREAD_PRIORITY_BACKGROUND;
|
|
|
|
|
|
|
|
|
|
import android.app.AlarmManager;
|
|
|
|
|
import android.app.NotificationManager;
|
|
|
|
|
import android.app.PendingIntent;
|
|
|
|
@ -95,8 +97,6 @@ import javax.mail.event.StoreListener;
|
|
|
|
|
|
|
|
|
|
import me.leolin.shortcutbadger.ShortcutBadger;
|
|
|
|
|
|
|
|
|
|
import static android.os.Process.THREAD_PRIORITY_BACKGROUND;
|
|
|
|
|
|
|
|
|
|
public class ServiceSynchronize extends ServiceBase implements SharedPreferences.OnSharedPreferenceChangeListener {
|
|
|
|
|
private Network lastActive = null;
|
|
|
|
|
private Boolean lastSuitable = null;
|
|
|
|
@ -2148,7 +2148,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
|
|
|
|
|
|
|
|
|
int backoff = state.getBackoff();
|
|
|
|
|
int recently = (lastLost + LOST_RECENTLY < now ? 1 : 2);
|
|
|
|
|
EntityLog.log(this, account.name + " backoff=" + backoff + " recently=" + recently);
|
|
|
|
|
EntityLog.log(this, account.name + " backoff=" + backoff + " recently=" + recently + "x");
|
|
|
|
|
|
|
|
|
|
if (backoff < CONNECT_BACKOFF_MAX)
|
|
|
|
|
state.setBackoff(backoff * 2);
|
|
|
|
|