Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.

Commit e18d0ea

Browse files
jamesmontemagnojfversluis
authored andcommitted
Don't require the storage read, isn't needed on Android.
Fixed #1961
1 parent 377f3d6 commit e18d0ea

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

Xamarin.Essentials/FilePicker/FilePicker.android.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ public static partial class FilePicker
1111
{
1212
static async Task<IEnumerable<FileResult>> PlatformPickAsync(PickOptions options, bool allowMultiple = false)
1313
{
14-
// we only need the permission when accessing the file, but it's more natural
15-
// to ask the user first, then show the picker.
16-
await Permissions.EnsureGrantedAsync<Permissions.StorageRead>();
17-
1814
// Essentials supports >= API 19 where this action is available
1915
var action = Intent.ActionOpenDocument;
2016

Xamarin.Essentials/MediaPicker/MediaPicker.android.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ static Task<FileResult> PlatformPickVideoAsync(MediaPickerOptions options)
2020

2121
static async Task<FileResult> PlatformPickAsync(MediaPickerOptions options, bool photo)
2222
{
23-
// We only need the permission when accessing the file, but it's more natural
24-
// to ask the user first, then show the picker.
25-
await Permissions.EnsureGrantedAsync<Permissions.StorageRead>();
26-
2723
var intent = new Intent(Intent.ActionGetContent);
2824
intent.SetType(photo ? FileSystem.MimeTypes.ImageAll : FileSystem.MimeTypes.VideoAll);
2925

0 commit comments

Comments
 (0)