From 899802a202837118efc37718fbdc9b3bcad30c75 Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Tue, 7 Jul 2015 14:27:35 -0700 Subject: [PATCH] CB-9259: Forgot to add another check on which URI we're using when fixing this thing the first time --- src/android/CameraLauncher.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/android/CameraLauncher.java b/src/android/CameraLauncher.java index c9584a3..986a9ae 100644 --- a/src/android/CameraLauncher.java +++ b/src/android/CameraLauncher.java @@ -379,7 +379,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect } //We don't support PNG, so let's not pretend we do - exif.createInFile(getTempDirectoryPath() + "/.Pic.jpg"); + exif.createInFile(sourcePath); exif.readExifData(); rotate = exif.getOrientation(); @@ -442,7 +442,13 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect this.callbackContext.success(uri.toString()); } else { - bitmap = getScaledBitmap(FileHelper.stripFileProtocol(imageUri.toString())); + if(croppedUri != null) { + bitmap = getScaledBitmap(FileHelper.stripFileProtocol(croppedUri.toString())); + } + else + { + bitmap = getScaledBitmap(FileHelper.stripFileProtocol(imageUri.toString())); + } if (rotate != 0 && this.correctOrientation) { bitmap = getRotatedBitmap(rotate, bitmap, exif);