|
|
@ -1282,6 +1282,9 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
|
|
|
|
|
|
|
|
|
|
|
// https://tools.ietf.org/html/rfc2177
|
|
|
|
// https://tools.ietf.org/html/rfc2177
|
|
|
|
final boolean capIdle = iservice.hasCapability("IDLE");
|
|
|
|
final boolean capIdle = iservice.hasCapability("IDLE");
|
|
|
|
|
|
|
|
final boolean capUtf8 =
|
|
|
|
|
|
|
|
iservice.hasCapability("UTF8=ACCEPT") ||
|
|
|
|
|
|
|
|
iservice.hasCapability("UTF8=ONLY");
|
|
|
|
Log.i(account.name + " idle=" + capIdle);
|
|
|
|
Log.i(account.name + " idle=" + capIdle);
|
|
|
|
if (!capIdle || account.poll_interval < OPTIMIZE_KEEP_ALIVE_INTERVAL)
|
|
|
|
if (!capIdle || account.poll_interval < OPTIMIZE_KEEP_ALIVE_INTERVAL)
|
|
|
|
optimizeAccount(account, "IDLE");
|
|
|
|
optimizeAccount(account, "IDLE");
|
|
|
@ -1289,6 +1292,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
|
|
|
final boolean capNotify = iservice.hasCapability("NOTIFY");
|
|
|
|
final boolean capNotify = iservice.hasCapability("NOTIFY");
|
|
|
|
|
|
|
|
|
|
|
|
db.account().setAccountState(account.id, "connected");
|
|
|
|
db.account().setAccountState(account.id, "connected");
|
|
|
|
|
|
|
|
db.account().setAccountCapabilities(account.id, capIdle, capUtf8);
|
|
|
|
db.account().setAccountError(account.id, null);
|
|
|
|
db.account().setAccountError(account.id, null);
|
|
|
|
db.account().setAccountWarning(account.id, null);
|
|
|
|
db.account().setAccountWarning(account.id, null);
|
|
|
|
|
|
|
|
|
|
|
|