diff --git a/src/android/CameraLauncher.java b/src/android/CameraLauncher.java index 64d185b..7196fcf 100644 --- a/src/android/CameraLauncher.java +++ b/src/android/CameraLauncher.java @@ -425,14 +425,14 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect exif.writeExifData(); } if (this.allowEdit) { - performCrop(uri); - } else { - // Send Uri back to JavaScript for viewing image - this.callbackContext.success(uri.toString()); - } + performCrop(uri); + } else { + // Send Uri back to JavaScript for viewing image + this.callbackContext.success(uri.toString()); + } } - // Send Uri back to JavaScript for viewing image - this.callbackContext.success(uri.toString()); + } else { + throw new IllegalStateException(); } this.cleanup(FILE_URI, this.imageUri, uri, bitmap);