Fixme added

This commit is contained in:
misaochan 2016-07-19 16:36:52 +12:00
parent f42bc80f2f
commit c21c4e4748

View file

@ -61,6 +61,7 @@ public class ContributionController {
} }
public void startGalleryPick() { public void startGalleryPick() {
//FIXME: Starts gallery (opens Google Photos)
Intent pickImageIntent = new Intent(Intent.ACTION_GET_CONTENT); Intent pickImageIntent = new Intent(Intent.ACTION_GET_CONTENT);
pickImageIntent.setType("image/*"); pickImageIntent.setType("image/*");
fragment.startActivityForResult(pickImageIntent, SELECT_FROM_GALLERY); fragment.startActivityForResult(pickImageIntent, SELECT_FROM_GALLERY);
@ -71,6 +72,7 @@ public class ContributionController {
shareIntent.setAction(Intent.ACTION_SEND); shareIntent.setAction(Intent.ACTION_SEND);
switch(requestCode) { switch(requestCode) {
case SELECT_FROM_GALLERY: case SELECT_FROM_GALLERY:
//FIXME: Handles image picked from gallery (from Google Photos)
shareIntent.setType(activity.getContentResolver().getType(data.getData())); shareIntent.setType(activity.getContentResolver().getType(data.getData()));
shareIntent.putExtra(Intent.EXTRA_STREAM, data.getData()); shareIntent.putExtra(Intent.EXTRA_STREAM, data.getData());
shareIntent.putExtra(UploadService.EXTRA_SOURCE, fr.free.nrw.commons.contributions.Contribution.SOURCE_GALLERY); shareIntent.putExtra(UploadService.EXTRA_SOURCE, fr.free.nrw.commons.contributions.Contribution.SOURCE_GALLERY);