From 72cbdcbc8d7252ad0c574a31015c2280eaab7692 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 25 Jun 2019 11:54:31 -0400 Subject: [PATCH] use internal FilesDir for temp photo --- src/Android/MainActivity.cs | 2 +- src/Android/Resources/xml/filepaths.xml | 2 +- src/Android/Services/DeviceActionService.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Android/MainActivity.cs b/src/Android/MainActivity.cs index 8ed15b12f..292e50149 100644 --- a/src/Android/MainActivity.cs +++ b/src/Android/MainActivity.cs @@ -203,7 +203,7 @@ namespace Bit.Droid else { // camera - var file = new Java.IO.File(GetExternalFilesDir("temp"), "camera_photo.jpg"); + var file = new Java.IO.File(FilesDir, "temp_camera_photo.jpg"); uri = FileProvider.GetUriForFile(this, "com.x8bit.bitwarden.fileprovider", file); fileName = $"photo_{DateTime.UtcNow.ToString("yyyyMMddHHmmss")}.jpg"; } diff --git a/src/Android/Resources/xml/filepaths.xml b/src/Android/Resources/xml/filepaths.xml index 030c83b5e..be754fbbb 100644 --- a/src/Android/Resources/xml/filepaths.xml +++ b/src/Android/Resources/xml/filepaths.xml @@ -1,5 +1,5 @@  - + diff --git a/src/Android/Services/DeviceActionService.cs b/src/Android/Services/DeviceActionService.cs index d0e6e2f0b..297932d90 100644 --- a/src/Android/Services/DeviceActionService.cs +++ b/src/Android/Services/DeviceActionService.cs @@ -201,7 +201,7 @@ namespace Bit.Droid.Services { try { - var file = new Java.IO.File(activity.GetExternalFilesDir("temp"), "camera_photo.jpg"); + var file = new Java.IO.File(activity.FilesDir, "temp_camera_photo.jpg"); if(!file.Exists()) { file.ParentFile.Mkdirs();