mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-20 23:56:20 +08:00
Updating cordova.android.js for CB-421 and CB-426
This commit is contained in:
parent
0577b4bf5d
commit
e213772f98
@ -1116,10 +1116,14 @@ cameraExport.getPicture = function(successCallback, errorCallback, options) {
|
||||
if (typeof options.encodingType == "number") {
|
||||
encodingType = options.encodingType;
|
||||
}
|
||||
// TODO: parse MediaType
|
||||
|
||||
var mediaType = Camera.MediaType.PICTURE;
|
||||
if (typeof options.mediaType == "number") {
|
||||
mediaType = options.mediaType;
|
||||
}
|
||||
// TODO: enable allow edit?
|
||||
|
||||
exec(successCallback, errorCallback, "Camera", "takePicture", [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType]);
|
||||
exec(successCallback, errorCallback, "Camera", "takePicture", [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType, mediaType]);
|
||||
}
|
||||
|
||||
module.exports = cameraExport;
|
||||
@ -1997,10 +2001,15 @@ Entry.prototype.remove = function(successCallback, errorCallback) {
|
||||
* @param errorCallback {Function} called with a FileError
|
||||
*/
|
||||
Entry.prototype.getParent = function(successCallback, errorCallback) {
|
||||
var win = typeof successCallback !== 'function' ? null : function(result) {
|
||||
var DirectoryEntry = require('cordova/plugin/DirectoryEntry');
|
||||
var entry = new DirectoryEntry(result.name, result.fullPath);
|
||||
successCallback(entry);
|
||||
};
|
||||
var fail = typeof errorCallback !== 'function' ? null : function(code) {
|
||||
errorCallback(new FileError(code));
|
||||
};
|
||||
exec(successCallback, fail, "File", "getParent", [this.fullPath]);
|
||||
exec(win, fail, "File", "getParent", [this.fullPath]);
|
||||
};
|
||||
|
||||
module.exports = Entry;
|
||||
|
Loading…
Reference in New Issue
Block a user