diff --git a/app/src/main/java/eu/faircode/email/Helper.java b/app/src/main/java/eu/faircode/email/Helper.java index ab822981bf..ab1047ef65 100644 --- a/app/src/main/java/eu/faircode/email/Helper.java +++ b/app/src/main/java/eu/faircode/email/Helper.java @@ -550,7 +550,10 @@ public class Helper { // Build intent Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndTypeAndNormalize(uri, type); - intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); + intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | + Intent.FLAG_ACTIVITY_NEW_TASK | + Intent.FLAG_ACTIVITY_CLEAR_TASK); + if (!TextUtils.isEmpty(name)) intent.putExtra(Intent.EXTRA_TITLE, Helper.sanitizeFilename(name)); Log.i("Intent=" + intent + " type=" + type);