|
|
@ -266,11 +266,6 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
|
|
|
start(current, current.accountState.isEnabled(current.enabled), false);
|
|
|
|
start(current, current.accountState.isEnabled(current.enabled), false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
TupleAccountNetworkState prev = accountStates.get(index);
|
|
|
|
|
|
|
|
Core.State state = coreStates.get(current.accountState.id);
|
|
|
|
|
|
|
|
if (state != null)
|
|
|
|
|
|
|
|
state.setNetworkState(current.networkState);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean reload = false;
|
|
|
|
boolean reload = false;
|
|
|
|
boolean sync = current.command.getBoolean("sync", false);
|
|
|
|
boolean sync = current.command.getBoolean("sync", false);
|
|
|
|
boolean force = current.command.getBoolean("force", false);
|
|
|
|
boolean force = current.command.getBoolean("force", false);
|
|
|
@ -280,6 +275,16 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (reload && force) {
|
|
|
|
|
|
|
|
Log.i("### update network state " + current);
|
|
|
|
|
|
|
|
current.networkState = ConnectionHelper.getNetworkState(ServiceSynchronize.this);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TupleAccountNetworkState prev = accountStates.get(index);
|
|
|
|
|
|
|
|
Core.State state = coreStates.get(current.accountState.id);
|
|
|
|
|
|
|
|
if (state != null)
|
|
|
|
|
|
|
|
state.setNetworkState(current.networkState);
|
|
|
|
|
|
|
|
|
|
|
|
accountStates.remove(index);
|
|
|
|
accountStates.remove(index);
|
|
|
|
|
|
|
|
|
|
|
|
// Some networks disallow email server connections:
|
|
|
|
// Some networks disallow email server connections:
|
|
|
|