mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
catch exception when cannot create temp cam file
This commit is contained in:
parent
75f99bf899
commit
45da12ad55
1 changed files with 11 additions and 7 deletions
|
@ -162,6 +162,8 @@ namespace Bit.Android.Services
|
|||
var chooserIntent = Intent.CreateChooser(docIntent, AppResources.FileSource);
|
||||
|
||||
if(!_cameraPermissionsDenied && hasCameraPermission && hasStorageWritePermission)
|
||||
{
|
||||
try
|
||||
{
|
||||
var root = new Java.IO.File(global::Android.OS.Environment.ExternalStorageDirectory, "bitwarden");
|
||||
var file = new Java.IO.File(root, "temp_camera_photo.jpg");
|
||||
|
@ -173,6 +175,8 @@ namespace Bit.Android.Services
|
|||
var outputFileUri = global::Android.Net.Uri.FromFile(file);
|
||||
additionalIntents.AddRange(GetCameraIntents(outputFileUri));
|
||||
}
|
||||
catch(Java.IO.IOException) { }
|
||||
}
|
||||
|
||||
if(additionalIntents.Count > 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue