Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61eeb2ff authored by Fs00's avatar Fs00
Browse files

Set ClipData on PDF sharing intent

parent 9e8e5315
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@

package com.gsnathan.pdfviewer;

import android.content.ClipData;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
@@ -76,6 +77,8 @@ public class Utils {
        email.putExtra(Intent.EXTRA_SUBJECT, subject);
        email.putExtra(Intent.EXTRA_TEXT, text);
        email.putExtra(Intent.EXTRA_STREAM, filePath);
        email.setClipData(new ClipData(subject, new String[] { "application/pdf" }, new ClipData.Item(filePath)));
        email.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
        return Intent.createChooser(email, title);
    }