Skip to content

Commit

Permalink
Don't require the storage read, isn't needed on Android.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmontemagno authored and jfversluis committed Apr 3, 2022
1 parent 377f3d6 commit e18d0ea
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions Xamarin.Essentials/FilePicker/FilePicker.android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ public static partial class FilePicker
{
static async Task<IEnumerable<FileResult>> PlatformPickAsync(PickOptions options, bool allowMultiple = false)
{
// we only need the permission when accessing the file, but it's more natural
// to ask the user first, then show the picker.
await Permissions.EnsureGrantedAsync<Permissions.StorageRead>();

// Essentials supports >= API 19 where this action is available
var action = Intent.ActionOpenDocument;

Expand Down
4 changes: 0 additions & 4 deletions Xamarin.Essentials/MediaPicker/MediaPicker.android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ static Task<FileResult> PlatformPickVideoAsync(MediaPickerOptions options)

static async Task<FileResult> PlatformPickAsync(MediaPickerOptions options, bool photo)
{
// We only need the permission when accessing the file, but it's more natural
// to ask the user first, then show the picker.
await Permissions.EnsureGrantedAsync<Permissions.StorageRead>();

var intent = new Intent(Intent.ActionGetContent);
intent.SetType(photo ? FileSystem.MimeTypes.ImageAll : FileSystem.MimeTypes.VideoAll);

Expand Down

0 comments on commit e18d0ea

Please sign in to comment.