Share as new task

This commit is contained in:
M66B
2021-02-12 11:40:25 +01:00
parent 879db6037f
commit 678ef5d949

View File

@@ -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);