Use GET_CONTENT instead of OPEN_DOCUMENT

This commit is contained in:
M66B
2020-03-20 18:10:20 +01:00
parent d90d4f310e
commit 15361fd1c4
2 changed files with 4 additions and 8 deletions

View File

@@ -1378,10 +1378,9 @@ public class FragmentCompose extends FragmentBase {
}
private void onActionImage() {
Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("image/*");
Helper.openAdvanced(intent);
PackageManager pm = getContext().getPackageManager();
if (intent.resolveActivity(pm) == null)
noStorageAccessFramework();
@@ -1390,11 +1389,10 @@ public class FragmentCompose extends FragmentBase {
}
private void onActionAttachment() {
Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("*/*");
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
Helper.openAdvanced(intent);
PackageManager pm = getContext().getPackageManager();
if (intent.resolveActivity(pm) == null)
noStorageAccessFramework();