Skip to content

Commit ed4a2b3

Browse files
committed
[22054] Ensure mobilePickPhoto() proceeds after taking a photo
On some Samsung devices, mobilePickPhoto() did not proceed after taking a photo using the device camera. This happened because the temp file where the photo would be stored until the user accepts it could not be created due to insufficient permissions. This patch ensures the appropriate permissions are set so as mobilePickPhoto() works as expected on all Android devices.
1 parent 5864806 commit ed4a2b3

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

docs/notes/bugfix-22054.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Ensure mobilePickPhoto() proceeds after taking a photo on Samsung phones

engine/src/java/com/runrev/android/Engine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2146,7 +2146,7 @@ public void showCamera()
21462146
String t_path = m_temp_image_file.getPath();
21472147

21482148
Uri t_uri;
2149-
t_uri = FileProvider.getProvider(getContext()).addPath(t_path, t_path, "image/jpeg", true, ParcelFileDescriptor.MODE_WRITE_ONLY);
2149+
t_uri = FileProvider.getProvider(getContext()).addPath(t_path, t_path, "image/jpeg", true, ParcelFileDescriptor.MODE_READ_WRITE);
21502150

21512151
Intent t_image_capture = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
21522152
t_image_capture.putExtra(MediaStore.EXTRA_OUTPUT, t_uri);

0 commit comments

Comments
 (0)