1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-20 13:17:08 +00:00

Open self

This commit is contained in:
M66B 2021-03-06 19:42:23 +01:00
parent 16d7c78a8d
commit a4497c3992

View file

@ -550,9 +550,13 @@ public class Helper {
// Build intent
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndTypeAndNormalize(uri, type);
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION |
Intent.FLAG_ACTIVITY_NEW_TASK |
Intent.FLAG_ACTIVITY_CLEAR_TASK);
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
if (!("message/rfc822".equals(type) ||
"message/delivery-status".equals(type) ||
"message/disposition-notification".equals(type) ||
"text/rfc822-headers".equals(type)))
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
if (!TextUtils.isEmpty(name))
intent.putExtra(Intent.EXTRA_TITLE, Helper.sanitizeFilename(name));