diff --git a/Xamarin.Essentials/MediaPicker/MediaPicker.android.cs b/Xamarin.Essentials/MediaPicker/MediaPicker.android.cs index 261aa9880..e75cbe059 100644 --- a/Xamarin.Essentials/MediaPicker/MediaPicker.android.cs +++ b/Xamarin.Essentials/MediaPicker/MediaPicker.android.cs @@ -56,7 +56,10 @@ static Task PlatformCaptureVideoAsync(MediaPickerOptions options) static async Task PlatformCaptureAsync(MediaPickerOptions options, bool photo) { await Permissions.EnsureGrantedAsync(); - await Permissions.EnsureGrantedAsync(); + + // StorageWrite no longer exists starting from Android API 33 + if (!Platform.HasApiLevel(33)) + await Permissions.EnsureGrantedAsync(); var capturePhotoIntent = new Intent(photo ? MediaStore.ActionImageCapture : MediaStore.ActionVideoCapture); diff --git a/Xamarin.Essentials/SecureStorage/SecureStorage.android.cs b/Xamarin.Essentials/SecureStorage/SecureStorage.android.cs index e8c4f2eb2..1724df206 100644 --- a/Xamarin.Essentials/SecureStorage/SecureStorage.android.cs +++ b/Xamarin.Essentials/SecureStorage/SecureStorage.android.cs @@ -128,11 +128,11 @@ static void PlatformRemoveAll() => internal static bool AlwaysUseAsymmetricKeyStorage { get; set; } = false; - // While MD5 is deemed to be not secure anymore, it is not used in a security context here. - // Here we hash a key value to ensure compatibility with the underlying platform's preferences storage (so the key was a determinate length and didn't exceed platform limits). - // As part as Microsofts ongoing efforts to secure the .NET ecosystem, this usage of an insecure hashing mechanism was flagged. - // An exception has been requested for the usage of this "unsafe" hashing mechanism. - // More details here (internal link): https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1676270 + // While MD5 is deemed to be not secure anymore, it is not used in a security context here. + // Here we hash a key value to ensure compatibility with the underlying platform's preferences storage (so the key was a determinate length and didn't exceed platform limits). + // As part as Microsofts ongoing efforts to secure the .NET ecosystem, this usage of an insecure hashing mechanism was flagged. + // An exception has been requested for the usage of this "unsafe" hashing mechanism. + // More details here (internal link): https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1676270 internal static string Md5Hash(string input) { var hash = new StringBuilder();