You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2015/07/07 23:27:48 UTC

cordova-plugin-camera git commit: CB-9259: Forgot to add another check on which URI we're using when fixing this thing the first time

Repository: cordova-plugin-camera
Updated Branches:
  refs/heads/master 1e607ddcc -> 899802a20


CB-9259: Forgot to add another check on which URI we're using when fixing this thing the first time


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/commit/899802a2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/899802a2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/899802a2

Branch: refs/heads/master
Commit: 899802a202837118efc37718fbdc9b3bcad30c75
Parents: 1e607dd
Author: Joe Bowser <bo...@apache.org>
Authored: Tue Jul 7 14:27:35 2015 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Tue Jul 7 14:27:44 2015 -0700

----------------------------------------------------------------------
 src/android/CameraLauncher.java | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/899802a2/src/android/CameraLauncher.java
----------------------------------------------------------------------
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);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org