mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 20:15:21 +00:00
Display error when camera doesn't return image
Partial #6926 // FREEBIE
This commit is contained in:
parent
e172b84603
commit
967c374213
@ -238,6 +238,7 @@
|
|||||||
<string name="CreateProfileActivity_updating_and_encrypting_profile">Updating and encrypting profile</string>
|
<string name="CreateProfileActivity_updating_and_encrypting_profile">Updating and encrypting profile</string>
|
||||||
<string name="CreateProfileActivity_profile_photo">Profile photo</string>
|
<string name="CreateProfileActivity_profile_photo">Profile photo</string>
|
||||||
<string name="CreateProfileActivity_too_long">Too long</string>
|
<string name="CreateProfileActivity_too_long">Too long</string>
|
||||||
|
<string name="CreateProfileActivity_error_capturing_photo_camera_did_not_return_image">Error capturing photo, camera did not return image</string>
|
||||||
|
|
||||||
<!-- CustomDefaultPreference -->
|
<!-- CustomDefaultPreference -->
|
||||||
<string name="CustomDefaultPreference_using_custom">Using custom: %s</string>
|
<string name="CustomDefaultPreference_using_custom">Using custom: %s</string>
|
||||||
|
@ -119,7 +119,9 @@ public class CreateProfileActivity extends BaseActionBarActivity implements Inje
|
|||||||
|
|
||||||
switch (requestCode) {
|
switch (requestCode) {
|
||||||
case REQUEST_CODE_AVATAR:
|
case REQUEST_CODE_AVATAR:
|
||||||
if (resultCode == Activity.RESULT_OK) {
|
if (resultCode == Activity.RESULT_OK && data == null) {
|
||||||
|
Toast.makeText(this, R.string.CreateProfileActivity_error_capturing_photo_camera_did_not_return_image, Toast.LENGTH_LONG).show();
|
||||||
|
} else if (resultCode == Activity.RESULT_OK) {
|
||||||
Uri outputFile = Uri.fromFile(new File(getCacheDir(), "cropped"));
|
Uri outputFile = Uri.fromFile(new File(getCacheDir(), "cropped"));
|
||||||
Uri inputFile = data.getData();
|
Uri inputFile = data.getData();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user