mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-27 02:07:12 +00:00
Revert "Intent.ACTION_QUICK_VIEW experiment"
This reverts commit 1c27def6f1
.
This commit is contained in:
parent
1c27def6f1
commit
a0ef4edd56
1 changed files with 1 additions and 11 deletions
|
@ -21,11 +21,9 @@ package eu.faircode.email;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.QuickViewConstants;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
|
@ -149,17 +147,9 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
|
|||
Log.i(Helper.TAG, "uri=" + uri);
|
||||
|
||||
// Build intent
|
||||
final Intent intent = new Intent(
|
||||
Build.VERSION.SDK_INT < Build.VERSION_CODES.N ? Intent.ACTION_VIEW : Intent.ACTION_QUICK_VIEW);
|
||||
final Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setDataAndType(uri, attachment.type);
|
||||
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
||||
intent.putExtra(Intent.EXTRA_QUICK_VIEW_FEATURES, new String[]{
|
||||
QuickViewConstants.FEATURE_VIEW,
|
||||
QuickViewConstants.FEATURE_DOWNLOAD,
|
||||
QuickViewConstants.FEATURE_SEND,
|
||||
QuickViewConstants.FEATURE_PRINT
|
||||
});
|
||||
Log.i(Helper.TAG, "Sharing " + file + " type=" + attachment.type);
|
||||
Log.i(Helper.TAG, "Intent=" + intent);
|
||||
|
||||
|
|
Loading…
Reference in a new issue