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
aea8543a
authored
Sep 05, 2016
by
Fernando Martínez Santiago
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
minor changes in PCB regarding notification behaviour
parent
ddce7b6a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
3 deletions
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/net/NetService.java
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/tools/PCBcontext.java
android/Pictogram/tablet/src/main/java/com/yottacode/pictogram/tablet/gui/PictogramActivity.java
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/net/NetService.java
View file @
aea8543a
...
...
@@ -94,7 +94,10 @@ public class NetService implements Runnable {
}
public
boolean
online
()
{
return
updated
;}
public
void
restart_app
()
{
this
.
device
.
restart_app
();}
public
void
restart_app
()
{
PCBcontext
.
unset_user
();
this
.
device
.
restart_app
();
}
/**
* ping to the server by using a restapi call. If ok, the call will return the empty set
...
...
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/tools/PCBcontext.java
View file @
aea8543a
...
...
@@ -69,6 +69,14 @@ public final class PCBcontext {
getNetService
().
notifyStatus
();
}
public
static
void
unset_user
()
{
pcbdb
=
null
;
if
(
room
!=
null
)
room
.
exit
();
room
=
null
;
vocabulary
=
null
;
getNetService
().
notifyStatus
();
}
/**
*
* @return true if a given user has been logged into the system (the login window was successfully filled)
...
...
android/Pictogram/tablet/src/main/java/com/yottacode/pictogram/tablet/gui/PictogramActivity.java
View file @
aea8543a
...
...
@@ -737,8 +737,10 @@ public class PictogramActivity extends Activity implements iVocabularyListener,
public
boolean
onLongClick
(
View
v
)
{
count_deletelong
++;
if
(
count_deletelong
>=
3
)
PCBcontext
.
getNetService
().
restart_app
();
if
(
count_deletelong
>=
3
)
{
PictogramActivity
.
this
.
finish
();
PCBcontext
.
getNetService
().
restart_app
();
}
return
false
;
}
}
...
...
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