mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-27 02:07:12 +00:00
Import with read permissions
This commit is contained in:
parent
3790cbe5fb
commit
b367a6e0a0
2 changed files with 6 additions and 2 deletions
|
@ -19,6 +19,7 @@ package eu.faircode.email;
|
|||
Copyright 2018-2021 by Marcel Bokhorst (M66B)
|
||||
*/
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Dialog;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationChannelGroup;
|
||||
|
@ -712,7 +713,8 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
|||
Uri uri = args.getParcelable("uri");
|
||||
String password = args.getString("password");
|
||||
|
||||
if (!"content".equals(uri.getScheme())) {
|
||||
if (!"content".equals(uri.getScheme()) &&
|
||||
!Helper.hasPermission(context, Manifest.permission.READ_EXTERNAL_STORAGE)) {
|
||||
Log.w("Import uri=" + uri);
|
||||
throw new IllegalArgumentException(context.getString(R.string.title_no_stream));
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ package eu.faircode.email;
|
|||
Copyright 2018-2021 by Marcel Bokhorst (M66B)
|
||||
*/
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
@ -392,7 +393,8 @@ public class FragmentRules extends FragmentBase {
|
|||
long fid = args.getLong("folder");
|
||||
Uri uri = args.getParcelable("uri");
|
||||
|
||||
if (!"content".equals(uri.getScheme())) {
|
||||
if (!"content".equals(uri.getScheme()) &&
|
||||
!Helper.hasPermission(context, Manifest.permission.READ_EXTERNAL_STORAGE)) {
|
||||
Log.w("Import uri=" + uri);
|
||||
throw new IllegalArgumentException(context.getString(R.string.title_no_stream));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue