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
2b1dfc05
authored
Jun 07, 2016
by
Fernando Martínez Santiago
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
working on login bug
parent
17a24f5a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
android/Pictogram/app/src/main/java/com/yottacode/pictogram/dao/LoginException.java
android/Pictogram/app/src/main/java/com/yottacode/pictogram/gui/SerialActivity.java
android/Pictogram/app/src/main/java/com/yottacode/pictogram/dao/LoginException.java
View file @
2b1dfc05
...
@@ -18,4 +18,8 @@ public class LoginException extends Exception{
...
@@ -18,4 +18,8 @@ public class LoginException extends Exception{
public
boolean
no_username_found
()
{
return
this
.
code
==
LoginException
.
UNKNOWN_USERNAME
;}
public
boolean
no_username_found
()
{
return
this
.
code
==
LoginException
.
UNKNOWN_USERNAME
;}
public
boolean
no_pwd_found
()
{
return
this
.
code
==
LoginException
.
BAD_PASSWORD
;}
public
boolean
no_pwd_found
()
{
return
this
.
code
==
LoginException
.
BAD_PASSWORD
;}
public
boolean
no_supervisor_students
()
{
return
this
.
code
==
LoginException
.
NO_STUDENTS
;}
public
boolean
no_supervisor_students
()
{
return
this
.
code
==
LoginException
.
NO_STUDENTS
;}
public
String
getLocalizedMessage
()
{
return
super
.
getLocalizedMessage
()+
" Username found:"
+!
no_username_found
()+
" Password found"
+!
no_pwd_found
()+
"Supervisor without students:"
+
no_supervisor_students
();
}
}
}
android/Pictogram/app/src/main/java/com/yottacode/pictogram/gui/SerialActivity.java
View file @
2b1dfc05
...
@@ -203,6 +203,7 @@ public class SerialActivity extends Activity {
...
@@ -203,6 +203,7 @@ public class SerialActivity extends Activity {
,
pictogramActivity
);
,
pictogramActivity
);
}
catch
(
JSONException
e
)
{
}
catch
(
JSONException
e
)
{
GUITools
.
show_alert
(
SerialActivity
.
this
,
R
.
string
.
serverError
,
e
.
getMessage
());
GUITools
.
show_alert
(
SerialActivity
.
this
,
R
.
string
.
serverError
,
e
.
getMessage
());
Log
.
e
(
this
.
getClass
().
getCanonicalName
(),
"JSON:"
+
e
.
getLocalizedMessage
());
progressDialog
.
dismiss
();
progressDialog
.
dismiss
();
}
}
...
@@ -217,6 +218,7 @@ public class SerialActivity extends Activity {
...
@@ -217,6 +218,7 @@ public class SerialActivity extends Activity {
GUITools
.
show_alert
(
SerialActivity
.
this
,
R
.
string
.
userErrorMsg
);
GUITools
.
show_alert
(
SerialActivity
.
this
,
R
.
string
.
userErrorMsg
);
else
else
GUITools
.
show_alert
(
SerialActivity
.
this
,
R
.
string
.
serverError
,
e
.
getMessage
());
GUITools
.
show_alert
(
SerialActivity
.
this
,
R
.
string
.
serverError
,
e
.
getMessage
());
Log
.
e
(
this
.
getClass
().
getCanonicalName
(),
"Server error:"
+
e
.
getLocalizedMessage
());
}});
}});
}
}
...
...
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