catch exception when cannot create temp cam file

This commit is contained in:
Kyle Spearrin 2017-07-26 16:19:58 -04:00
parent 75f99bf899
commit 45da12ad55

View file

@ -162,6 +162,8 @@ namespace Bit.Android.Services
var chooserIntent = Intent.CreateChooser(docIntent, AppResources.FileSource); var chooserIntent = Intent.CreateChooser(docIntent, AppResources.FileSource);
if(!_cameraPermissionsDenied && hasCameraPermission && hasStorageWritePermission) if(!_cameraPermissionsDenied && hasCameraPermission && hasStorageWritePermission)
{
try
{ {
var root = new Java.IO.File(global::Android.OS.Environment.ExternalStorageDirectory, "bitwarden"); var root = new Java.IO.File(global::Android.OS.Environment.ExternalStorageDirectory, "bitwarden");
var file = new Java.IO.File(root, "temp_camera_photo.jpg"); 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); var outputFileUri = global::Android.Net.Uri.FromFile(file);
additionalIntents.AddRange(GetCameraIntents(outputFileUri)); additionalIntents.AddRange(GetCameraIntents(outputFileUri));
} }
catch(Java.IO.IOException) { }
}
if(additionalIntents.Count > 0) if(additionalIntents.Count > 0)
{ {