Replace min optimize keep alive by min tune keep alive

pull/194/merge
M66B 3 years ago
parent fd7c41dcd7
commit 60d337ff86

@ -120,7 +120,6 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
private static final long STILL_THERE_THRESHOLD = 3 * 60 * 1000L; // milliseconds
private static final int TUNE_KEEP_ALIVE_INTERVAL_MIN = 9; // minutes
private static final int TUNE_KEEP_ALIVE_INTERVAL_STEP = 2; // minutes
private static final int OPTIMIZE_KEEP_ALIVE_INTERVAL_MIN = 12; // minutes
private static final int OPTIMIZE_POLL_INTERVAL = 15; // minutes
private static final int CONNECT_BACKOFF_START = 8; // seconds
private static final int CONNECT_BACKOFF_MAX = 8; // seconds (totally 8+2x20=48 seconds)
@ -1450,7 +1449,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
capabilities = capabilities.substring(0, 500) + "...";
Log.i(account.name + " idle=" + capIdle);
if (!capIdle || account.poll_interval < OPTIMIZE_KEEP_ALIVE_INTERVAL_MIN)
if (!capIdle || account.poll_interval < TUNE_KEEP_ALIVE_INTERVAL_MIN)
optimizeAccount(account, "IDLE");
db.account().setAccountState(account.id, "connected");

Loading…
Cancel
Save