mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-19 03:42:52 +08:00
Merge branch 'master' into dev
This commit is contained in:
commit
763e6f0e9a
@ -153,15 +153,26 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
|
||||
this.targetHeight = -1;
|
||||
}
|
||||
|
||||
if (srcType == CAMERA) {
|
||||
this.takePicture(destType, encodingType);
|
||||
try {
|
||||
if (srcType == CAMERA) {
|
||||
this.takePicture(destType, encodingType);
|
||||
}
|
||||
else if ((srcType == PHOTOLIBRARY) || (srcType == SAVEDPHOTOALBUM)) {
|
||||
this.getImage(srcType, destType);
|
||||
}
|
||||
}
|
||||
else if ((srcType == PHOTOLIBRARY) || (srcType == SAVEDPHOTOALBUM)) {
|
||||
this.getImage(srcType, destType);
|
||||
catch (IllegalArgumentException e)
|
||||
{
|
||||
callbackContext.error("Illegal Argument Exception");
|
||||
PluginResult r = new PluginResult(PluginResult.Status.ERROR);
|
||||
callbackContext.sendPluginResult(r);
|
||||
return true;
|
||||
}
|
||||
|
||||
PluginResult r = new PluginResult(PluginResult.Status.NO_RESULT);
|
||||
r.setKeepCallback(true);
|
||||
callbackContext.sendPluginResult(r);
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user