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

Make sure to require permissions #1651

Merged
merged 1 commit into from
Jan 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Xamarin.Essentials/FilePicker/FilePicker.android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ static async Task<IEnumerable<FileResult>> PlatformPickAsync(PickOptions options
{
// 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.RequestAsync<Permissions.StorageRead>();
await Permissions.EnsureGrantedAsync<Permissions.StorageRead>();

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