Merge pull request #525 from alexbakker/icon-multi-intent

Combine ACTION_PICK and ACTION_GET_CONTENT when selecting an icon
pull/526/head
Michael Schättgen 5 years ago committed by GitHub
commit 8c34ce8f38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -392,8 +392,12 @@ public class EditEntryActivity extends AegisActivity {
Intent galleryIntent = new Intent(Intent.ACTION_PICK);
galleryIntent.setDataAndType(android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI, "image/*");
Intent fileIntent = new Intent(Intent.ACTION_GET_CONTENT);
fileIntent.setType("image/*");
Intent chooserIntent = Intent.createChooser(galleryIntent, getString(R.string.select_icon));
startActivityForResult(Intent.createChooser(chooserIntent, getString(R.string.select_icon)), PICK_IMAGE_REQUEST);
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[] { fileIntent });
startActivityForResult(chooserIntent, PICK_IMAGE_REQUEST);
}
private void startEditingIcon(Uri data) {

Loading…
Cancel
Save