Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b6938fcc
authored
Jan 05, 2017
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'develop' of
http://scm.ujaen.es/softuno/pictogram
into develop
parents
b2df4cc6
d2ef1eba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/dao/LoginException.java
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/net/NetService.java
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/dao/LoginException.java
View file @
b6938fcc
...
@@ -14,15 +14,14 @@ public class LoginException extends RestapiWrapper.HTTPException {
...
@@ -14,15 +14,14 @@ public class LoginException extends RestapiWrapper.HTTPException {
public
LoginException
(
String
msg
,
int
code
)
{
public
LoginException
(
String
msg
,
int
code
)
{
super
(
msg
,
code
);
super
(
msg
,
code
);
this
.
code
=
msg
.
contains
(
"
User
without students"
)
this
.
code
=
msg
.
contains
(
"without students"
)
?
LoginException
.
NO_STUDENTS
?
LoginException
.
NO_STUDENTS
:
msg
.
contains
(
"failed to connect"
)
:
msg
.
contains
(
"failed to connect"
)
?
LoginException
.
TIME_OUT
?
LoginException
.
TIME_OUT
:
msg
.
contains
(
"invalid license"
)
:
msg
.
contains
(
"invalid license"
)
?
LoginException
.
NO_LICENSE
?
LoginException
.
NO_LICENSE
:
msg
.
contains
(
"username"
)
:
LoginException
.
BAD_LOGIN
?
LoginException
.
BAD_LOGIN
;
:
LoginException
.
TIME_OUT
;
}
}
public
boolean
login_failed
()
{
return
this
.
code
==
LoginException
.
BAD_LOGIN
;}
public
boolean
login_failed
()
{
return
this
.
code
==
LoginException
.
BAD_LOGIN
;}
...
...
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/net/NetService.java
View file @
b6938fcc
...
@@ -12,6 +12,7 @@ import com.yottacode.pictogram.tools.PCBcontext;
...
@@ -12,6 +12,7 @@ import com.yottacode.pictogram.tools.PCBcontext;
import
org.json.JSONArray
;
import
org.json.JSONArray
;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
import
java.util.Date
;
import
java.util.concurrent.ScheduledThreadPoolExecutor
;
import
java.util.concurrent.ScheduledThreadPoolExecutor
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
...
@@ -143,6 +144,12 @@ public class NetService implements Runnable {
...
@@ -143,6 +144,12 @@ public class NetService implements Runnable {
setOffline
(
e
);
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
()
{
public
void
notifyStatus
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment