mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 14:46:31 +02:00
Refactoring
This commit is contained in:
@@ -218,11 +218,11 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
|
||||
private void onShare(EntityAttachment attachment) {
|
||||
// https://developer.android.com/reference/android/support/v4/content/FileProvider
|
||||
File file = attachment.getFile(context);
|
||||
final Uri uri = FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID, file);
|
||||
Uri uri = FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID, file);
|
||||
Log.i("uri=" + uri);
|
||||
|
||||
// Build intent
|
||||
final Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setDataAndType(uri, attachment.type);
|
||||
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
if (!TextUtils.isEmpty(attachment.name))
|
||||
|
||||
Reference in New Issue
Block a user