Commit 10ba73be by German Callejas

Issue #960 arreglado

parent b6af742c
...@@ -1114,17 +1114,13 @@ protected void showOnlyTape(boolean onlyTape) { ...@@ -1114,17 +1114,13 @@ protected void showOnlyTape(boolean onlyTape) {
case GALLERY_PIC_REQUEST: //Galeria case GALLERY_PIC_REQUEST: //Galeria
if(data!=null){ if(data!=null){
Uri selectedImage = data.getData(); Uri selectedImage = data.getData();
String[] filePathColumn = {MediaStore.Images.Media.DATA}; Bitmap bitmap = null;
try {
Cursor cursor = getContentResolver().query(selectedImage, filePathColumn, null, null, null); bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), selectedImage);
cursor.moveToFirst(); } catch (IOException e) {
e.printStackTrace();
int columnIndex = cursor.getColumnIndex(filePathColumn[0]); }
String filePath = cursor.getString(columnIndex); this.launchEditPictoActivity(bitmap);
cursor.close();
imagen = BitmapFactory.decodeFile(filePath);
this.launchEditPictoActivity(imagen);
} }
break; break;
case EditPictoActivity.EDIT_PICTO_REQUEST: case EditPictoActivity.EDIT_PICTO_REQUEST:
...@@ -1179,6 +1175,7 @@ protected void showOnlyTape(boolean onlyTape) { ...@@ -1179,6 +1175,7 @@ protected void showOnlyTape(boolean onlyTape) {
* @param image * @param image
*/ */
public void launchEditPictoActivity(Bitmap image){ public void launchEditPictoActivity(Bitmap image){
Intent intent = new Intent(this, EditPictoActivity.class); Intent intent = new Intent(this, EditPictoActivity.class);
if(image!=null) { if(image!=null) {
...@@ -1199,7 +1196,6 @@ protected void showOnlyTape(boolean onlyTape) { ...@@ -1199,7 +1196,6 @@ protected void showOnlyTape(boolean onlyTape) {
intent.putExtra(EditPictoActivity.IMAGE_PICTO, byteArray); intent.putExtra(EditPictoActivity.IMAGE_PICTO, byteArray);
intent.putExtra(Picto.JSON_ATTTRS.EXPRESSION, getIntent().getStringExtra(Picto.JSON_ATTTRS.EXPRESSION)); intent.putExtra(Picto.JSON_ATTTRS.EXPRESSION, getIntent().getStringExtra(Picto.JSON_ATTTRS.EXPRESSION));
startActivityForResult(intent, EditPictoActivity.EDIT_PICTO_REQUEST); startActivityForResult(intent, EditPictoActivity.EDIT_PICTO_REQUEST);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment