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
48b4080a
authored
Feb 21, 2017
by
Fernando Martínez Santiago
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
issue #962 closed
parent
10ba73be
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
63 additions
and
54 deletions
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/net/NetService.java
android/Pictogram/supervisor_tablet/supervisor_tablet.iml
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/PictogramActivity.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/net/NetServiceTablet.java
android/Pictogram/tabletlibrary/tabletlibrary.iml
android/Pictogram/yotta_tablet/yotta_tablet.iml
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/net/NetService.java
View file @
48b4080a
...
@@ -3,7 +3,6 @@ package com.yottacode.pictogram.net;
...
@@ -3,7 +3,6 @@ package com.yottacode.pictogram.net;
import
android.app.AlertDialog
;
import
android.app.AlertDialog
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.DialogInterface
;
import
android.content.DialogInterface
;
import
android.content.Intent
;
import
android.text.SpannableString
;
import
android.text.SpannableString
;
import
android.text.method.LinkMovementMethod
;
import
android.text.method.LinkMovementMethod
;
import
android.text.util.Linkify
;
import
android.text.util.Linkify
;
...
@@ -144,11 +143,7 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin {
...
@@ -144,11 +143,7 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin {
if
(
listener
instanceof
iNetServiceDevice
)
((
iNetServiceDevice
)
listener
).
restart_app
(
direct_login
);
if
(
listener
instanceof
iNetServiceDevice
)
((
iNetServiceDevice
)
listener
).
restart_app
(
direct_login
);
PCBcontext
.
unset_user
();
PCBcontext
.
unset_user
();
}
}
public
void
restart_app
(
Intent
intent
,
boolean
direct_login
)
{
for
(
iNetServiceStatus
listener:
listeners
)
if
(
listener
instanceof
iNetServiceDevice
)
((
iNetServiceDevice
)
listener
).
restart_app
(
intent
,
direct_login
);
PCBcontext
.
unset_user
();
}
/**
/**
* ping to the server by using a restapi call. If ok, the call will return the empty set
* ping to the server by using a restapi call. If ok, the call will return the empty set
...
@@ -321,7 +316,6 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin {
...
@@ -321,7 +316,6 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin {
public
void
build
();
public
void
build
();
public
void
closeNotifyStatus
();
public
void
closeNotifyStatus
();
public
void
restart_app
(
boolean
direct_login
);
public
void
restart_app
(
boolean
direct_login
);
public
void
restart_app
(
Intent
intent
,
boolean
direct_login
);
public
void
updateUserConfig
(
User
user
);
public
void
updateUserConfig
(
User
user
);
}
}
...
...
android/Pictogram/supervisor_tablet/supervisor_tablet.iml
View file @
48b4080a
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
<facet
type=
"android"
name=
"Android"
>
<facet
type=
"android"
name=
"Android"
>
<configuration>
<configuration>
<option
name=
"SELECTED_BUILD_VARIANT"
value=
"CIFlavorDebug"
/>
<option
name=
"SELECTED_BUILD_VARIANT"
value=
"CIFlavorDebug"
/>
<option
name=
"SELECTED_TEST_ARTIFACT"
value=
"_android_test_"
/>
<option
name=
"ASSEMBLE_TASK_NAME"
value=
"assembleCIFlavorDebug"
/>
<option
name=
"ASSEMBLE_TASK_NAME"
value=
"assembleCIFlavorDebug"
/>
<option
name=
"COMPILE_JAVA_TASK_NAME"
value=
"compileCIFlavorDebugSources"
/>
<option
name=
"COMPILE_JAVA_TASK_NAME"
value=
"compileCIFlavorDebugSources"
/>
<afterSyncTasks>
<afterSyncTasks>
...
@@ -38,6 +39,7 @@
...
@@ -38,6 +39,7 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavorDebug/assets"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavorDebug/assets"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavorDebug/aidl"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavorDebug/aidl"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavorDebug/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavorDebug/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavorDebug/jni"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavorDebug/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavorDebug/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavorDebug/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavorDebug/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavorDebug/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavorDebug/res"
type=
"java-test-resource"
/>
...
@@ -45,6 +47,7 @@
...
@@ -45,6 +47,7 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavorDebug/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavorDebug/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavorDebug/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavorDebug/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavorDebug/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavorDebug/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavorDebug/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavorDebug/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavorDebug/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavorDebug/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavorDebug/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/build/generated/source/r/androidTest/CIFlavor/debug"
isTestSource=
"true"
generated=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/build/generated/source/r/androidTest/CIFlavor/debug"
isTestSource=
"true"
generated=
"true"
/>
...
@@ -59,27 +62,31 @@
...
@@ -59,27 +62,31 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavor/assets"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavor/assets"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavor/aidl"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavor/aidl"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavor/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavor/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavor/jni"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavor/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavor/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavor/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/CIFlavor/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestCIFlavor/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestCIFlavor/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestCIFlavor/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestCIFlavor/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestCIFlavor/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestCIFlavor/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestCIFlavor/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavor/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavor/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavor/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavor/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavor/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavor/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavor/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavor/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavor/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavor/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavor/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavor/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavor/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavor/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testCIFlavor/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestCIFlavor/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestCIFlavor/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestCIFlavor/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestCIFlavor/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestCIFlavor/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestCIFlavor/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestCIFlavor/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTestCIFlavor/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/res"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/res"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/resources"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/resources"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/assets"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/assets"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/aidl"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/aidl"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/jni"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/debug/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/res"
type=
"java-test-resource"
/>
...
@@ -87,6 +94,7 @@
...
@@ -87,6 +94,7 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/testDebug/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/res"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/res"
type=
"java-resource"
/>
...
@@ -94,22 +102,25 @@
...
@@ -94,22 +102,25 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/assets"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/assets"
type=
"java-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/aidl"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/aidl"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/jni"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/shaders"
isTestSource=
"true"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/blame"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/blame"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/24.2.1/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/24.2.1/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/24.2.1/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/24.2.1/jars"
/>
...
@@ -140,6 +151,7 @@
...
@@ -140,6 +151,7 @@
<orderEntry
type=
"library"
exported=
""
name=
"support-vector-drawable-24.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"support-vector-drawable-24.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"support-core-utils-24.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"support-core-utils-24.2.1"
level=
"project"
/>
<orderEntry
type=
"module"
module-name=
"tabletlibrary"
exported=
""
/>
<orderEntry
type=
"module"
module-name=
"tabletlibrary"
exported=
""
/>
<orderEntry
type=
"library"
exported=
""
name=
"android-android-24"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"okhttp-ws-2.3.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"okhttp-ws-2.3.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"play-services-base-9.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"play-services-base-9.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"socket.io-client-0.5.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"socket.io-client-0.5.0"
level=
"project"
/>
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/PictogramActivity.java
View file @
48b4080a
...
@@ -8,9 +8,7 @@ import android.content.ClipDescription;
...
@@ -8,9 +8,7 @@ import android.content.ClipDescription;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.DialogInterface
;
import
android.content.DialogInterface
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.database.Cursor
;
import
android.graphics.Bitmap
;
import
android.graphics.Bitmap
;
import
android.graphics.BitmapFactory
;
import
android.graphics.PixelFormat
;
import
android.graphics.PixelFormat
;
import
android.graphics.Point
;
import
android.graphics.Point
;
import
android.media.Ringtone
;
import
android.media.Ringtone
;
...
@@ -133,11 +131,16 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
...
@@ -133,11 +131,16 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
super
.
onCreate
(
savedInstanceState
);
// blockNotificationBar();
// blockNotificationBar();
requestWindowFeature
(
Window
.
FEATURE_NO_TITLE
);
requestWindowFeature
(
Window
.
FEATURE_NO_TITLE
);
// after a long inactivity, the pcbdb is discarded
// after a long inactivity, the pcbdb is discarded
if
(!
PCBcontext
.
is_user_logged
())
{
if
(!
PCBcontext
.
is_user_logged
())
{
Log
.
i
(
LOG_TAG
,
"PCBDB was discarded. App restarting"
);
Log
.
i
(
LOG_TAG
,
"PCBDB was discarded. App restarting"
);
NetServiceTablet
.
restart_PictogramTablet
(
null
,
false
);
NetServiceTablet
.
restart_PictogramTablet
(
this
);
return
;
}
}
setContentView
(
PCBcontext
.
getPcbdb
().
getCurrentUser
().
is_picto_size_big
()
?
R
.
layout
.
activity_pictogram_big
:
R
.
layout
.
activity_pictogram
);
setContentView
(
PCBcontext
.
getPcbdb
().
getCurrentUser
().
is_picto_size_big
()
?
R
.
layout
.
activity_pictogram_big
:
R
.
layout
.
activity_pictogram
);
...
@@ -146,7 +149,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
...
@@ -146,7 +149,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
this
.
count_deletelong
=
0
;
this
.
count_deletelong
=
0
;
if
(!
PCBcontext
.
is_user_logged
())
{
if
(!
PCBcontext
.
is_user_logged
())
{
Log
.
i
(
LOG_TAG
,
"No user logged. Restarting app"
);
Log
.
i
(
LOG_TAG
,
"No user logged. Restarting app"
);
PCBcontext
.
getNetService
().
restart_app
(
false
);
NetServiceTablet
.
restart_PictogramTablet
(
this
);
return
;
return
;
}
}
...
@@ -1023,7 +1026,7 @@ protected void showOnlyTape(boolean onlyTape) {
...
@@ -1023,7 +1026,7 @@ protected void showOnlyTape(boolean onlyTape) {
PictogramActivity
.
this
.
finish
();
PictogramActivity
.
this
.
finish
();
if
(
SessionActivity
.
session
!=
null
)
SessionActivity
.
session
.
finish
();
if
(
SessionActivity
.
session
!=
null
)
SessionActivity
.
session
.
finish
();
PCBcontext
.
getNetService
().
restart_app
(
serialActivity
,
fals
e
);
PCBcontext
.
getNetService
().
restart_app
(
tru
e
);
}
}
return
false
;
return
false
;
}
}
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/net/NetServiceTablet.java
View file @
48b4080a
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
net
;
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
net
;
import
android.app.Activity
;
import
android.app.NotificationManager
;
import
android.app.NotificationManager
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.support.v4.app.NotificationCompat
;
import
android.support.v4.app.NotificationCompat
;
import
android.util.Log
;
import
android.util.Log
;
...
@@ -65,38 +67,36 @@ public class NetServiceTablet implements NetService.iNetServiceDevice {
...
@@ -65,38 +67,36 @@ public class NetServiceTablet implements NetService.iNetServiceDevice {
}
}
/**
* if the user becomes from offline to online and the login is failed, then the user relogin in
* the app. The most frequent reason is a password change while the user have been logged
* offline
*/
public
void
restart_app
(
Intent
serialActivity
,
boolean
direct_login
)
{
NetServiceTablet
.
restart_PictogramTablet
(
serialActivity
,
direct_login
);
}
public
static
void
restart_PictogramTablet
(
Intent
serialActivity
,
boolean
direct_login
)
{
public
static
void
restart_PictogramTablet
(
Activity
activity
)
{
Log
.
i
(
LOG_TAG
,
"App restarting"
);
if
(
serialActivity
==
null
)
{
Class
serialClass
;
try
{
serialClass
=
Class
.
forName
(
PCBcontext
.
getContext
().
getString
(
R
.
string
.
SerialClass
));
}
catch
(
ClassNotFoundException
e
)
{
Log
.
e
(
LOG_TAG
,
"S:"
+
PCBcontext
.
getContext
().
getString
(
R
.
string
.
SerialClass
));
serialClass
=
SerialActivity
.
class
;
}
serialActivity
=
new
Intent
(
PCBcontext
.
getContext
(),
serialClass
);
}
serialActivity
.
putExtra
(
"resetPrevUser"
,
!
direct_login
);
if
(
direct_login
)
{
serialActivity
.
putExtra
(
"switch_usr"
,
PCBcontext
.
getPcbdb
().
getCurrentUser
().
is_supervisor
()
?
PCBcontext
.
getPcbdb
().
getCurrentUser
().
get_email_sup
()
:
PCBcontext
.
getPcbdb
().
getCurrentUser
().
get_nickname_stu
());
serialActivity
.
putExtra
(
"switch_pwd"
,
PCBcontext
.
getPcbdb
().
getCurrentUser
().
is_supervisor
()
?
PCBcontext
.
getPcbdb
().
getCurrentUser
().
get_pwd_sup
()
:
PCBcontext
.
getPcbdb
().
getCurrentUser
().
get_pwd_stu
());
}
PCBcontext
.
getContext
().
startActivity
(
serialActivity
);
Log
.
i
(
LOG_TAG
,
"App restarting"
);
Intent
serialActivity
=
activity
.
getIntent
();
Context
context
=
activity
.
getBaseContext
();
serialActivity
.
putExtra
(
"resetPrevUser"
,
false
);
serialActivity
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
context
.
startActivity
(
serialActivity
);
activity
.
finish
();
}
}
public
void
restart_app
(
boolean
direct_login
)
{
restart_app
(
null
,
direct_login
);}
public
void
restart_app
(
boolean
direct_login
)
{
Log
.
i
(
LOG_TAG
,
"App restarting"
);
Context
context
=
PCBcontext
.
getContext
();
Class
serialClass
;
try
{
serialClass
=
Class
.
forName
(
PCBcontext
.
getContext
().
getString
(
R
.
string
.
SerialClass
));
}
catch
(
ClassNotFoundException
e
)
{
Log
.
e
(
LOG_TAG
,
"S:"
+
PCBcontext
.
getContext
().
getString
(
R
.
string
.
SerialClass
));
serialClass
=
SerialActivity
.
class
;
}
Intent
serialActivity
=
new
Intent
(
context
,
serialClass
);
serialActivity
.
putExtra
(
"resetPrevUser"
,
direct_login
);
context
.
startActivity
(
serialActivity
);
}
public
void
setPictogramActivity
(
PictogramActivity
pictogramActivity
)
{
this
.
pictogramActivity
=
pictogramActivity
;}
public
void
setPictogramActivity
(
PictogramActivity
pictogramActivity
)
{
this
.
pictogramActivity
=
pictogramActivity
;}
public
void
updateUserConfig
(
User
user
)
{
public
void
updateUserConfig
(
User
user
)
{
this
.
pictogramActivity
.
setConfig
();
this
.
pictogramActivity
.
setConfig
();
...
...
android/Pictogram/tabletlibrary/tabletlibrary.iml
View file @
48b4080a
This diff is collapsed.
Click to expand it.
android/Pictogram/yotta_tablet/yotta_tablet.iml
View file @
48b4080a
This diff is collapsed.
Click to expand it.
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