From 79d230514adcda4f343a7c2b13d6538637b4cbcf Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 16 Nov 2019 14:17:59 +0100 Subject: [PATCH] Normalize data/type --- app/src/main/java/eu/faircode/email/AdapterAttachment.java | 2 +- app/src/main/java/eu/faircode/email/AdapterImage.java | 2 +- app/src/main/java/eu/faircode/email/AdapterMessage.java | 2 +- app/src/main/java/eu/faircode/email/EntityAttachment.java | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/AdapterAttachment.java b/app/src/main/java/eu/faircode/email/AdapterAttachment.java index 5835d7b840..907d999f6a 100644 --- a/app/src/main/java/eu/faircode/email/AdapterAttachment.java +++ b/app/src/main/java/eu/faircode/email/AdapterAttachment.java @@ -227,7 +227,7 @@ public class AdapterAttachment extends RecyclerView.Adapter // Build intent Intent intent = new Intent(Intent.ACTION_VIEW); - intent.setDataAndType(uri, attachment.type); + intent.setDataAndTypeAndNormalize(uri, attachment.type); intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); if (!TextUtils.isEmpty(attachment.name)) intent.putExtra(Intent.EXTRA_TITLE, attachment.name); diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index 87c9794889..1d73a2dc0b 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -2417,7 +2417,7 @@ public class AdapterMessage extends RecyclerView.Adapter