incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bcur...@apache.org
Subject android commit: Arguments are passed as JSON array, not JSON object.
Date Sun, 19 Feb 2012 06:15:42 GMT
Updated Branches:
  refs/heads/master cc8edea06 -> 918877315


Arguments are passed as JSON array, not JSON object.


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/91887731
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/91887731
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/91887731

Branch: refs/heads/master
Commit: 918877315242477a2a50b7b8f42ec24da65a63d5
Parents: cc8edea
Author: Bryce Curtis <curtis.bryce@gmail.com>
Authored: Sun Feb 19 00:15:23 2012 -0600
Committer: Bryce Curtis <curtis.bryce@gmail.com>
Committed: Sun Feb 19 00:15:23 2012 -0600

----------------------------------------------------------------------
 .../src/org/apache/cordova/CameraLauncher.java     |   16 +++++---------
 1 files changed, 6 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/91887731/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 ec1cc36..c7eac88 100755
--- a/framework/src/org/apache/cordova/CameraLauncher.java
+++ b/framework/src/org/apache/cordova/CameraLauncher.java
@@ -108,16 +108,12 @@ public class CameraLauncher extends Plugin {
                 this.mediaType = PICTURE;
                 this.mQuality = 80;
 
-                JSONObject options = args.optJSONObject(0);
-                if (options != null) {
-                    srcType = options.getInt("sourceType");
-                    destType = options.getInt("destinationType");
-                    this.targetHeight = options.getInt("targetHeight");
-                    this.targetWidth = options.getInt("targetWidth");
-                    this.encodingType = options.getInt("encodingType");
-                    this.mediaType = options.getInt("mediaType");
-                    this.mQuality = options.getInt("quality");
-                }
+                this.mQuality = args.getInt(0);
+                destType = args.getInt(1);
+                srcType = args.getInt(2);
+                this.targetWidth = args.getInt(3);
+                this.targetHeight = args.getInt(4);
+                this.encodingType = args.getInt(5);
                 
                 if (srcType == CAMERA) {
                     this.takePicture(destType, encodingType);


Mime
View raw message