Normalize data/type

This commit is contained in:
M66B
2019-11-16 14:17:59 +01:00
parent d19c0c9e6d
commit 79d230514a
4 changed files with 5 additions and 3 deletions

View File

@@ -227,7 +227,7 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
// Build intent
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(uri, type);
intent.setDataAndTypeAndNormalize(uri, type);
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
if (!TextUtils.isEmpty(attachment.name))
intent.putExtra(Intent.EXTRA_TITLE, Helper.sanitizeFilename(attachment.name));