Explicitly request read URI permission

This commit is contained in:
M66B
2022-06-25 14:22:31 +02:00
parent 73fb69008c
commit 5db35154df
7 changed files with 9 additions and 0 deletions

View File

@@ -396,6 +396,7 @@ public class FragmentContacts extends FragmentBase {
} else {
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(pm) == null) // system whitelisted
ToastEx.makeText(context, R.string.title_no_saf, Toast.LENGTH_LONG).show();