Commit b6938fcc by Arturo Montejo Ráez

Merge branch 'develop' of http://scm.ujaen.es/softuno/pictogram into develop

parents b2df4cc6 d2ef1eba
......@@ -14,15 +14,14 @@ public class LoginException extends RestapiWrapper.HTTPException {
public LoginException(String msg, int code) {
super(msg,code);
this.code=msg.contains("User without students")
this.code=msg.contains("without students")
? LoginException.NO_STUDENTS
: msg.contains("failed to connect")
? LoginException.TIME_OUT
: msg.contains("invalid license")
? LoginException.NO_LICENSE
: msg.contains("username")
? LoginException.BAD_LOGIN
: LoginException.TIME_OUT;
: LoginException.BAD_LOGIN
;
}
public boolean login_failed() {return this.code==LoginException.BAD_LOGIN;}
......
......@@ -12,6 +12,7 @@ import com.yottacode.pictogram.tools.PCBcontext;
import org.json.JSONArray;
import org.json.JSONObject;
import java.util.Date;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
......@@ -143,6 +144,12 @@ public class NetService implements Runnable {
setOffline(e);
}
});
//cada minuto se fuerza sincronización de vocabulario y configuración de usuario
if (online() && new Date().getTime()%60==0) {
Log.i(this.getClass().getCanonicalName(),"Vocabulary request");
PCBcontext.getVocabulary().synchronize();
}
}
public void notifyStatus() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment