You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2012/08/08 21:54:03 UTC
android commit: CB-1212: When camera is started,
and then cancelled with no photo,
attempt to read exif data results in fatal error
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 <si...@gmail.com>
Authored: Wed Aug 8 15:53:48 2012 -0400
Committer: macdonst <si...@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;