mirror of https://github.com/M66B/FairEmail.git
Fixed adding photos on some Android versions/variants
This commit is contained in:
parent
a80c3a953f
commit
ee62bce462
|
@ -1589,13 +1589,18 @@ public class FragmentCompose extends FragmentBase {
|
||||||
onAddImage(data.getBundleExtra("args").getBoolean("photo"));
|
onAddImage(data.getBundleExtra("args").getBoolean("photo"));
|
||||||
break;
|
break;
|
||||||
case REQUEST_IMAGE_FILE:
|
case REQUEST_IMAGE_FILE:
|
||||||
case REQUEST_TAKE_PHOTO:
|
|
||||||
if (resultCode == RESULT_OK && data != null) {
|
if (resultCode == RESULT_OK && data != null) {
|
||||||
Uri uri = (requestCode == REQUEST_TAKE_PHOTO ? photoURI : data.getData());
|
Uri uri = data.getData();
|
||||||
if (uri != null)
|
if (uri != null)
|
||||||
onAddImageFile(uri);
|
onAddImageFile(uri);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case REQUEST_TAKE_PHOTO:
|
||||||
|
if (resultCode == RESULT_OK) {
|
||||||
|
if (photoURI != null)
|
||||||
|
onAddImageFile(photoURI);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case REQUEST_ATTACHMENT:
|
case REQUEST_ATTACHMENT:
|
||||||
case REQUEST_RECORD_AUDIO:
|
case REQUEST_RECORD_AUDIO:
|
||||||
if (resultCode == RESULT_OK && data != null)
|
if (resultCode == RESULT_OK && data != null)
|
||||||
|
|
Loading…
Reference in New Issue