thefringeninja
20 hours ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
6 additions and
2 deletions
-
src/Android/Avalonia.Android/Platform/Storage/AndroidStorageProvider.cs
|
|
@ -297,8 +297,12 @@ internal class AndroidStorageProvider : IStorageProvider |
|
|
ActivityFlags.GrantReadUriPermission) |
|
|
ActivityFlags.GrantReadUriPermission) |
|
|
== global::Android.Content.PM.Permission.Granted; |
|
|
== global::Android.Content.PM.Permission.Granted; |
|
|
|
|
|
|
|
|
// TODO: call RequestPermission or add proper permissions API, something like in Browser File API.
|
|
|
// https://developer.android.com/reference/android/Manifest.permission#READ_EXTERNAL_STORAGE
|
|
|
hasPerms = hasPerms || await _activity.CheckPermission(Manifest.Permission.ReadExternalStorage); |
|
|
if (!OperatingSystem.IsAndroidVersionAtLeast(33)) |
|
|
|
|
|
{ |
|
|
|
|
|
// TODO: call RequestPermission or add proper permissions API, something like in Browser File API.
|
|
|
|
|
|
hasPerms = hasPerms || await _activity.CheckPermission(Manifest.Permission.ReadExternalStorage); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
catch (Exception ex) |
|
|
catch (Exception ex) |
|
|
{ |
|
|
{ |
|
|
|