mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-28 11:55:20 +01:00
Explicitly request read URI permission
This commit is contained in:
@@ -1752,6 +1752,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
||||
private void onImportCertificate(Intent intent) {
|
||||
Intent open = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
open.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
open.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
open.setType("*/*");
|
||||
if (open.resolveActivity(getPackageManager()) == null) // system whitelisted
|
||||
ToastEx.makeText(this, R.string.title_no_saf, Toast.LENGTH_LONG).show();
|
||||
@@ -1776,6 +1777,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
||||
private static Intent getIntentImport() {
|
||||
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
intent.setType("*/*");
|
||||
return intent;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user