forked from github/cordova-android
Updating Android to 2.2.0rc1
This commit is contained in:
parent
e562e4e7b9
commit
08dfb13dbf
@ -33,7 +33,7 @@
|
|||||||
<p class="event received">Device is Ready</p>
|
<p class="event received">Device is Ready</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" src="cordova-2.1.0.js"></script>
|
<script type="text/javascript" src="cordova-2.2.0rc1.js"></script>
|
||||||
<script type="text/javascript" src="js/index.js"></script>
|
<script type="text/javascript" src="js/index.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
app.initialize();
|
app.initialize();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// commit e799aef6a4e24e95b341798e19ffeb39b43ce2c1
|
// commit 98d190ad98ec48f4f06c61286faee99c0eb000ed
|
||||||
|
|
||||||
// File generated at :: Tue Oct 02 2012 09:37:50 GMT-0400 (EDT)
|
// File generated at :: Mon Oct 15 2012 13:22:37 GMT-0700 (PDT)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Licensed to the Apache Software Foundation (ASF) under one
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
@ -234,14 +234,6 @@ var cordova = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// TODO: iOS only
|
|
||||||
// This queue holds the currently executing command and all pending
|
|
||||||
// commands executed with cordova.exec().
|
|
||||||
commandQueue:[],
|
|
||||||
// Indicates if we're currently in the middle of flushing the command
|
|
||||||
// queue on the native side.
|
|
||||||
commandQueueFlushing:false,
|
|
||||||
// END TODO
|
|
||||||
/**
|
/**
|
||||||
* Plugin callback mechanism.
|
* Plugin callback mechanism.
|
||||||
*/
|
*/
|
||||||
@ -502,8 +494,8 @@ var Channel = function(type, sticky) {
|
|||||||
if (!(--i)) h();
|
if (!(--i)) h();
|
||||||
};
|
};
|
||||||
for (var j=0; j<len; j++) {
|
for (var j=0; j<len; j++) {
|
||||||
if (c[j].state == 0) {
|
if (c[j].state === 0) {
|
||||||
throw Error('Can only use join with sticky channels.')
|
throw Error('Can only use join with sticky channels.');
|
||||||
}
|
}
|
||||||
c[j].subscribe(f);
|
c[j].subscribe(f);
|
||||||
}
|
}
|
||||||
@ -602,7 +594,7 @@ Channel.prototype.unsubscribe = function(f) {
|
|||||||
if (handler) {
|
if (handler) {
|
||||||
delete this.handlers[guid];
|
delete this.handlers[guid];
|
||||||
this.numHandlers--;
|
this.numHandlers--;
|
||||||
if (this.numHandlers == 0) {
|
if (this.numHandlers === 0) {
|
||||||
this.onHasSubscribersChange && this.onHasSubscribersChange();
|
this.onHasSubscribersChange && this.onHasSubscribersChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -675,6 +667,37 @@ module.exports = channel;
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// file: lib/common/commandProxy.js
|
||||||
|
define("cordova/commandProxy", function(require, exports, module) {
|
||||||
|
|
||||||
|
|
||||||
|
// internal map of proxy function
|
||||||
|
var CommandProxyMap = {};
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
|
||||||
|
// example: cordova.commandProxy.add("Accelerometer",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...);
|
||||||
|
add:function(id,proxyObj) {
|
||||||
|
console.log("adding proxy for " + id);
|
||||||
|
CommandProxyMap[id] = proxyObj;
|
||||||
|
return proxyObj;
|
||||||
|
},
|
||||||
|
|
||||||
|
// cordova.commandProxy.remove("Accelerometer");
|
||||||
|
remove:function(id) {
|
||||||
|
var proxy = CommandProxyMap[id];
|
||||||
|
delete CommandProxyMap[id];
|
||||||
|
CommandProxyMap[id] = null;
|
||||||
|
return proxy;
|
||||||
|
},
|
||||||
|
|
||||||
|
get:function(service,action) {
|
||||||
|
return ( CommandProxyMap[service] ? CommandProxyMap[service][action] : null );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
// file: lib/common/common.js
|
// file: lib/common/common.js
|
||||||
define("cordova/common", function(require, exports, module) {
|
define("cordova/common", function(require, exports, module) {
|
||||||
|
|
||||||
@ -2817,7 +2840,7 @@ FileTransfer.prototype.download = function(source, target, successCallback, erro
|
|||||||
*/
|
*/
|
||||||
FileTransfer.prototype.abort = function(successCallback, errorCallback) {
|
FileTransfer.prototype.abort = function(successCallback, errorCallback) {
|
||||||
exec(successCallback, errorCallback, 'FileTransfer', 'abort', [this._id]);
|
exec(successCallback, errorCallback, 'FileTransfer', 'abort', [this._id]);
|
||||||
}
|
};
|
||||||
|
|
||||||
module.exports = FileTransfer;
|
module.exports = FileTransfer;
|
||||||
|
|
||||||
@ -3427,23 +3450,26 @@ we should simply use a literal :
|
|||||||
errorCallbackFunction( {'code':3} );
|
errorCallbackFunction( {'code':3} );
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(!MediaError) {
|
var _MediaError = window.MediaError;
|
||||||
var MediaError = function(code, msg) {
|
|
||||||
|
|
||||||
|
if(!_MediaError) {
|
||||||
|
window.MediaError = _MediaError = function(code, msg) {
|
||||||
this.code = (typeof code != 'undefined') ? code : null;
|
this.code = (typeof code != 'undefined') ? code : null;
|
||||||
this.message = msg || ""; // message is NON-standard! do not use!
|
this.message = msg || ""; // message is NON-standard! do not use!
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
MediaError.MEDIA_ERR_NONE_ACTIVE = MediaError.MEDIA_ERR_NONE_ACTIVE || 0;
|
_MediaError.MEDIA_ERR_NONE_ACTIVE = _MediaError.MEDIA_ERR_NONE_ACTIVE || 0;
|
||||||
MediaError.MEDIA_ERR_ABORTED = MediaError.MEDIA_ERR_ABORTED || 1;
|
_MediaError.MEDIA_ERR_ABORTED = _MediaError.MEDIA_ERR_ABORTED || 1;
|
||||||
MediaError.MEDIA_ERR_NETWORK = MediaError.MEDIA_ERR_NETWORK || 2;
|
_MediaError.MEDIA_ERR_NETWORK = _MediaError.MEDIA_ERR_NETWORK || 2;
|
||||||
MediaError.MEDIA_ERR_DECODE = MediaError.MEDIA_ERR_DECODE || 3;
|
_MediaError.MEDIA_ERR_DECODE = _MediaError.MEDIA_ERR_DECODE || 3;
|
||||||
MediaError.MEDIA_ERR_NONE_SUPPORTED = MediaError.MEDIA_ERR_NONE_SUPPORTED || 4;
|
_MediaError.MEDIA_ERR_NONE_SUPPORTED = _MediaError.MEDIA_ERR_NONE_SUPPORTED || 4;
|
||||||
// TODO: MediaError.MEDIA_ERR_NONE_SUPPORTED is legacy, the W3 spec now defines it as below.
|
// TODO: MediaError.MEDIA_ERR_NONE_SUPPORTED is legacy, the W3 spec now defines it as below.
|
||||||
// as defined by http://dev.w3.org/html5/spec-author-view/video.html#error-codes
|
// as defined by http://dev.w3.org/html5/spec-author-view/video.html#error-codes
|
||||||
MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED = MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED || 4;
|
_MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED = _MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED || 4;
|
||||||
|
|
||||||
module.exports = MediaError;
|
module.exports = _MediaError;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -3910,7 +3936,7 @@ var nativeApi = this._cordovaNative || require('cordova/plugin/android/promptbas
|
|||||||
var currentApi = nativeApi;
|
var currentApi = nativeApi;
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
get: function() { return currentApi },
|
get: function() { return currentApi; },
|
||||||
setPreferPrompt: function(value) {
|
setPreferPrompt: function(value) {
|
||||||
currentApi = value ? require('cordova/plugin/android/promptbasednativeapi') : nativeApi;
|
currentApi = value ? require('cordova/plugin/android/promptbasednativeapi') : nativeApi;
|
||||||
}
|
}
|
||||||
@ -4405,7 +4431,6 @@ var Battery = function() {
|
|||||||
for (var key in this.channels) {
|
for (var key in this.channels) {
|
||||||
this.channels[key].onHasSubscribersChange = Battery.onHasSubscribersChange;
|
this.channels[key].onHasSubscribersChange = Battery.onHasSubscribersChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Event handlers for when callbacks get registered for the battery.
|
* Event handlers for when callbacks get registered for the battery.
|
||||||
@ -6406,7 +6431,7 @@ window.cordova = require('cordova');
|
|||||||
// Replace navigator before any modules are required(), to ensure it happens as soon as possible.
|
// Replace navigator before any modules are required(), to ensure it happens as soon as possible.
|
||||||
// We replace it so that properties that can't be clobbered can instead be overridden.
|
// We replace it so that properties that can't be clobbered can instead be overridden.
|
||||||
if (typeof navigator != 'undefined') {
|
if (typeof navigator != 'undefined') {
|
||||||
function CordovaNavigator() {}
|
var CordovaNavigator = function () {};
|
||||||
CordovaNavigator.prototype = navigator;
|
CordovaNavigator.prototype = navigator;
|
||||||
navigator = new CordovaNavigator();
|
navigator = new CordovaNavigator();
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title></title>
|
<title></title>
|
||||||
<script src="cordova-2.1.0.js"></script>
|
<script src="cordova-2.2.0rc1.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ import android.telephony.TelephonyManager;
|
|||||||
public class Device extends CordovaPlugin {
|
public class Device extends CordovaPlugin {
|
||||||
public static final String TAG = "Device";
|
public static final String TAG = "Device";
|
||||||
|
|
||||||
public static String cordovaVersion = "2.1.0"; // Cordova version
|
public static String cordovaVersion = "2.2.0rc1"; // Cordova version
|
||||||
public static String platform = "Android"; // Device OS
|
public static String platform = "Android"; // Device OS
|
||||||
public static String uuid; // Device UUID
|
public static String uuid; // Device UUID
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user