1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 10:17:18 +00:00

Fixed adding photos on some Android versions/variants

This commit is contained in:
M66B 2020-03-27 14:44:22 +01:00
parent a80c3a953f
commit ee62bce462

View file

@ -1589,13 +1589,18 @@ public class FragmentCompose extends FragmentBase {
onAddImage(data.getBundleExtra("args").getBoolean("photo"));
break;
case REQUEST_IMAGE_FILE:
case REQUEST_TAKE_PHOTO:
if (resultCode == RESULT_OK && data != null) {
Uri uri = (requestCode == REQUEST_TAKE_PHOTO ? photoURI : data.getData());
Uri uri = data.getData();
if (uri != null)
onAddImageFile(uri);
}
break;
case REQUEST_TAKE_PHOTO:
if (resultCode == RESULT_OK) {
if (photoURI != null)
onAddImageFile(photoURI);
}
break;
case REQUEST_ATTACHMENT:
case REQUEST_RECORD_AUDIO:
if (resultCode == RESULT_OK && data != null)