incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From macdo...@apache.org
Subject android commit: CB-1212: When camera is started, and then cancelled with no photo, attempt to read exif data results in fatal error
Date Wed, 08 Aug 2012 19:54:03 GMT
Updated Branches:
  refs/heads/master d35c91324 -> c52dc10c9


CB-1212: When camera is started, and then cancelled with no photo, attempt to read exif data
results in fatal error


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/c52dc10c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/c52dc10c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/c52dc10c

Branch: refs/heads/master
Commit: c52dc10c9e49dcb21b6488c413aa55a5b365dca0
Parents: d35c913
Author: macdonst <simon.macdonald@gmail.com>
Authored: Wed Aug 8 15:53:48 2012 -0400
Committer: macdonst <simon.macdonald@gmail.com>
Committed: Wed Aug 8 15:53:48 2012 -0400

----------------------------------------------------------------------
 .../src/org/apache/cordova/CameraLauncher.java     |   23 ++++++++-------
 1 files changed, 12 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/c52dc10c/framework/src/org/apache/cordova/CameraLauncher.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CameraLauncher.java b/framework/src/org/apache/cordova/CameraLauncher.java
index 6d05c64..e820265 100755
--- a/framework/src/org/apache/cordova/CameraLauncher.java
+++ b/framework/src/org/apache/cordova/CameraLauncher.java
@@ -273,20 +273,21 @@ public class CameraLauncher extends Plugin implements MediaScannerConnectionClie
 
         // If CAMERA
         if (srcType == CAMERA) {
-            // Create an ExifHelper to save the exif data that is lost during compression
-            ExifHelper exif = new ExifHelper();
-            try {
-                if (this.encodingType == JPEG) {
-                    exif.createInFile(DirectoryManager.getTempDirectoryPath(this.cordova.getActivity())
+ "/.Pic.jpg");
-                    exif.readExifData();
-                    rotate = exif.getOrientation();
-                }
-            } catch (IOException e) {
-                e.printStackTrace();
-            }
             // If image available
             if (resultCode == Activity.RESULT_OK) {
                 try {
+                    // Create an ExifHelper to save the exif data that is lost during compression
+                    ExifHelper exif = new ExifHelper();
+                    try {
+                        if (this.encodingType == JPEG) {
+                            exif.createInFile(DirectoryManager.getTempDirectoryPath(this.cordova.getActivity())
+ "/.Pic.jpg");
+                            exif.readExifData();
+                            rotate = exif.getOrientation();
+                        }
+                    } catch (IOException e) {
+                        e.printStackTrace();
+                    }
+
                     Bitmap bitmap = null;
                     Uri uri = null;
 


Mime
View raw message