From fef33d591d8d1a3e2a751c345d31cb1ee343ff12 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 11 Mar 2020 12:07:56 +0100 Subject: [PATCH] Use chooser --- app/src/main/java/eu/faircode/email/ActivitySignature.java | 2 +- app/src/main/java/eu/faircode/email/FragmentCompose.java | 4 ++-- app/src/main/java/eu/faircode/email/FragmentIdentity.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ActivitySignature.java b/app/src/main/java/eu/faircode/email/ActivitySignature.java index ad9504aa3c..7b27fe0c2f 100644 --- a/app/src/main/java/eu/faircode/email/ActivitySignature.java +++ b/app/src/main/java/eu/faircode/email/ActivitySignature.java @@ -229,7 +229,7 @@ public class ActivitySignature extends ActivityBase { intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); intent.setType("image/*"); Helper.openAdvanced(intent); - startActivityForResult(intent, REQUEST_IMAGE); + startActivityForResult(Helper.getChooser(this, intent), REQUEST_IMAGE); } private boolean onActionStyle(int action) { diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index b566a46079..a2a6589c3f 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -1339,7 +1339,7 @@ public class FragmentCompose extends FragmentBase { snackbar.show(); } else try { - startActivityForResult(intent, REQUEST_RECORD_AUDIO); + startActivityForResult(Helper.getChooser(getContext(), intent), REQUEST_RECORD_AUDIO); } catch (SecurityException ex) { Log.w(ex); Snackbar.make(view, getString(R.string.title_no_viewer, intent.getAction()), Snackbar.LENGTH_INDEFINITE).show(); @@ -1368,7 +1368,7 @@ public class FragmentCompose extends FragmentBase { try { photoURI = FileProvider.getUriForFile(getContext(), BuildConfig.APPLICATION_ID, file); intent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI); - startActivityForResult(intent, REQUEST_TAKE_PHOTO); + startActivityForResult(Helper.getChooser(getContext(), intent), REQUEST_TAKE_PHOTO); } catch (SecurityException ex) { Log.w(ex); Snackbar.make(view, getString(R.string.title_no_viewer, intent.getAction()), Snackbar.LENGTH_LONG).show(); diff --git a/app/src/main/java/eu/faircode/email/FragmentIdentity.java b/app/src/main/java/eu/faircode/email/FragmentIdentity.java index 5b556c43ae..61745483bd 100644 --- a/app/src/main/java/eu/faircode/email/FragmentIdentity.java +++ b/app/src/main/java/eu/faircode/email/FragmentIdentity.java @@ -335,7 +335,7 @@ public class FragmentIdentity extends FragmentBase { public void onClick(View v) { Intent intent = new Intent(getContext(), ActivitySignature.class); intent.putExtra("html", signature); - startActivityForResult(intent, ActivitySetup.REQUEST_IDENITY_SIGNATURE); + startActivityForResult(Helper.getChooser(getContext(), intent), ActivitySetup.REQUEST_IDENITY_SIGNATURE); } });