mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-23 11:45:38 +01:00
catch exception when cannot create temp cam file
This commit is contained in:
parent
75f99bf899
commit
45da12ad55
@ -163,15 +163,19 @@ namespace Bit.Android.Services
|
||||
|
||||
if(!_cameraPermissionsDenied && hasCameraPermission && hasStorageWritePermission)
|
||||
{
|
||||
var root = new Java.IO.File(global::Android.OS.Environment.ExternalStorageDirectory, "bitwarden");
|
||||
var file = new Java.IO.File(root, "temp_camera_photo.jpg");
|
||||
if(!file.Exists())
|
||||
try
|
||||
{
|
||||
file.ParentFile.Mkdirs();
|
||||
file.CreateNewFile();
|
||||
var root = new Java.IO.File(global::Android.OS.Environment.ExternalStorageDirectory, "bitwarden");
|
||||
var file = new Java.IO.File(root, "temp_camera_photo.jpg");
|
||||
if(!file.Exists())
|
||||
{
|
||||
file.ParentFile.Mkdirs();
|
||||
file.CreateNewFile();
|
||||
}
|
||||
var outputFileUri = global::Android.Net.Uri.FromFile(file);
|
||||
additionalIntents.AddRange(GetCameraIntents(outputFileUri));
|
||||
}
|
||||
var outputFileUri = global::Android.Net.Uri.FromFile(file);
|
||||
additionalIntents.AddRange(GetCameraIntents(outputFileUri));
|
||||
catch(Java.IO.IOException) { }
|
||||
}
|
||||
|
||||
if(additionalIntents.Count > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user