Skip to content
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
5 changes: 3 additions & 2 deletions src/Essentials/src/FilePicker/FilePicker.android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,19 @@ void OnResult(Intent intent)
// The uri returned is only temporary and only lives as long as the Activity that requested it,
// so this means that it will always be cleaned up by the time we need it because we are using
// an intermediate activity.
bool requireExtendedAccess = !(OperatingSystem.IsAndroidVersionAtLeast(30) && Android.OS.Environment.IsExternalStorageManager);

if (intent.ClipData == null)
{
var path = FileSystemUtils.EnsurePhysicalPath(intent.Data);
var path = FileSystemUtils.EnsurePhysicalPath(intent.Data,requireExtendedAccess);
resultList.Add(new FileResult(path));
}
else
{
for (var i = 0; i < intent.ClipData.ItemCount; i++)
{
var uri = intent.ClipData.GetItemAt(i).Uri;
var path = FileSystemUtils.EnsurePhysicalPath(uri);
var path = FileSystemUtils.EnsurePhysicalPath(uri,requireExtendedAccess);
resultList.Add(new FileResult(path));
}
}
Expand Down
Loading