Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
infil00p committed Feb 20, 2012
2 parents fef0e42 + 9188773 commit c9d4276
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
16 changes: 6 additions & 10 deletions framework/src/org/apache/cordova/CameraLauncher.java
Expand Up @@ -108,16 +108,12 @@ public PluginResult execute(String action, JSONArray args, String callbackId) {
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);
Expand Down
Expand Up @@ -87,13 +87,13 @@ else if(screenHeight == width)
// gone away.
else if (height > oldHeight) {
if(app != null)
app.sendJavascript("Cordova.fireDocumentEvent('hidekeyboard');");
app.sendJavascript("require('cordova').fireDocumentEvent('hidekeyboard');");
}
// If the height as gotten smaller then we will assume the soft keyboard has
// been displayed.
else if (height < oldHeight) {
if(app != null)
app.sendJavascript("Cordova.fireDocumentEvent('showkeyboard');");
app.sendJavascript("require('cordova').fireDocumentEvent('showkeyboard');");
}

// Update the old height for the next event
Expand Down

0 comments on commit c9d4276

Please sign in to comment.