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
bbe38841
authored
Apr 27, 2017
by
Germán Callejas Alcántara
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Eliminación de varios logs en el código para comprobaciones propias
parent
5d7657e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
22 deletions
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/cropper/EditPictoActivity.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/cropper/EditPictoActivity.java
View file @
bbe38841
...
...
@@ -343,7 +343,6 @@ public class EditPictoActivity extends Activity {
//Obtener el picto a editar
if
(
editar
){
Log
.
i
(
DEBUG_MESSAGE
,
"EDITAR"
);
p
=
PCBcontext
.
getVocabulary
().
get_picto
(
getIntent
().
getExtras
().
getInt
(
Picto
.
JSON_ATTTRS
.
CATEGORY
),
getIntent
().
getExtras
().
getInt
(
PictoMenu
.
ID_PICTO_IMAGE
));
legend
.
setText
(
p
.
get_translation
());
supAsociado
.
setText
(
p
.
get_user_avatar
()==
null
?
NO_SUP_TEXT
:
p
.
get_user_avatar
());
...
...
@@ -352,13 +351,11 @@ public class EditPictoActivity extends Activity {
if
(
p
.
get_audioFile
()
!=
null
){
borrado
=
false
;
hayGrabacion
=
true
;
Log
.
i
(
DEBUG_MESSAGE
,
"Picto CON sonido asociado"
);
layoutGrabacion
.
setVisibility
(
View
.
GONE
);
layoutPreview
.
setVisibility
(
View
.
VISIBLE
);
botonReproducir
.
setEnabled
(
true
);
assignFileToPlayer
(
p
.
get_audioFile
());
}
else
{
Log
.
i
(
DEBUG_MESSAGE
,
"Picto SIN sonido asociado"
);
layoutPreview
.
setVisibility
(
View
.
INVISIBLE
);
layoutGrabacion
.
setVisibility
(
View
.
VISIBLE
);
hayGrabacion
=
false
;
...
...
@@ -399,7 +396,6 @@ public class EditPictoActivity extends Activity {
public
void
onItemClick
(
AdapterView
<?>
parent
,
View
view
,
int
position
,
long
id
)
{
String
[]
assocciated_person
=
mDrawerList
.
getAdapter
().
getItem
(
position
).
toString
().
split
(
"\n"
);
supAsociado
.
setText
(
assocciated_person
[
1
]);
Log
.
i
(
"TAG_PRUEBS"
,
"Sup elegido: "
+
supAsociado
.
getText
());
mDrawerLayout
.
closeDrawer
(
Gravity
.
RIGHT
);
}
});
...
...
@@ -443,29 +439,23 @@ public class EditPictoActivity extends Activity {
}
if
(
hayGrabacion
)
{
//Si ha grabado algo -> Ir a renombrarlo
Log
.
i
(
DEBUG_MESSAGE
,
"Ha grabado pasa a comprobar"
);
File
file
=
new
File
(
previewAudioPath
);
if
(
file
.
exists
())
{
Log
.
i
(
DEBUG_MESSAGE
,
"fichero test.mp3 y existia"
);
File
from
=
new
File
(
previewAudioPath
);
File
to
=
new
File
(
editar
?
dirAudioPath
+
File
.
separator
+
legend
.
getText
().
toString
()
+
"_"
+
id_pic
+
"_audio.mp3"
:
dirAudioPath
+
File
.
separator
+
legend
.
getText
().
toString
()
+
"_new_"
+
pathNumber
+
"_audio.mp3"
);
if
(
from
.
exists
()){
from
.
renameTo
(
to
);
audioPath
=
to
.
getPath
().
toString
();
Log
.
i
(
DEBUG_MESSAGE
,
"Path renombrado "
+
audioPath
);
}
}
}
Log
.
i
(
DEBUG_MESSAGE
,
"Picto: "
+
p
.
get_translation
()+
"--sonido: "
+
p
.
get_audioPath
()+
"-->"
+
p
.
getUriSound
());
Intent
intent
=
getIntent
();
//Mandar a pictogram activity el path y el texto de la imagen
intent
.
putExtra
(
PictoMenu
.
IS_EDIT
,
editar
);
//Para saber despues si estas editando o añadiendo nuevo y coger los datos de intent o de data en OnActivityResult
intent
.
putExtra
(
PictoMenu
.
PATH
,
filepath
);
//Mandar Path imagen
intent
.
putExtra
(
PictoMenu
.
PATH_SOUND
,
editar
?
((!
borrado
&&
p
.
getUriSound
()!=
null
)
?
p
.
get_audioPath
()
:
audioPath
)
:
audioPath
);
//Mandar el path del audio
Log
.
i
(
DEBUG_MESSAGE
,
"Manda esto: "
+
(
editar
?
((!
borrado
&&
p
.
getUriSound
()!=
null
)
?
"p.get_audioPath()"
:
"borrado+audioPath"
)
:
"audioPath"
));
Log
.
e
(
LOG_TAG
,
"PATH SOUND:"
+
audioPath
);
intent
.
putExtra
(
Picto
.
JSON_ATTTRS
.
EXPRESSION
,
legend
.
getText
().
toString
());
//Mandar expresion nueva
intent
.
putExtra
(
Picto
.
JSON_ATTTRS
.
CATEGORY
,
getIntent
().
getIntExtra
(
Picto
.
JSON_ATTTRS
.
CATEGORY
,
-
1
));
intent
.
putExtra
(
Picto
.
JSON_ATTTRS
.
USER_AVATAR
,
supAsociado
.
getText
());
...
...
@@ -505,8 +495,6 @@ public class EditPictoActivity extends Activity {
tareaGrabacion
=
(
RecordTask
)
new
RecordTask
().
execute
(
tiempoGrabado
);
startRecording
();
Log
.
i
(
DEBUG_MESSAGE
,
"Grabando.."
);
return
true
;
case
MotionEvent
.
ACTION_UP
:
tareaGrabacion
.
cancel
(
true
);
...
...
@@ -523,15 +511,12 @@ public class EditPictoActivity extends Activity {
botonReproducir
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
Log
.
i
(
DEBUG_MESSAGE
,
"Click"
);
if
(
reproduciendo
){
tareaReproduccion
.
cancel
(
true
);
reproduciendo
=
false
;
Log
.
i
(
DEBUG_MESSAGE
,
"Parar"
);
botonReproducir
.
setImageResource
(
android
.
R
.
drawable
.
ic_media_play
);
}
else
{
reproduciendo
=
true
;
Log
.
i
(
DEBUG_MESSAGE
,
"Reproducir"
);
tareaReproduccion
=
(
PlayTask
)
new
PlayTask
().
execute
(
tiempoTotal
);
startPlaying
();
botonReproducir
.
setImageResource
(
android
.
R
.
drawable
.
ic_media_pause
);
...
...
@@ -545,13 +530,6 @@ public class EditPictoActivity extends Activity {
borrado
=
true
;
if
(
hayGrabacion
){
stopPlaying
();
/*if(editar){
if(p.getUriSound() != null) {
Log.i(DEBUG_MESSAGE,"Eliminado->"+p.getUriSound());
p.setUriSound(null);
}
}*/
//Log.i(DEBUG_MESSAGE,"Eliminado->"+previewAudioPath);
layoutGrabacion
.
setVisibility
(
View
.
VISIBLE
);
layoutPreview
.
setVisibility
(
View
.
GONE
);
hayGrabacion
=
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