mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-20 23:56:20 +08:00
Upping the version to 2.0.0
This commit is contained in:
parent
b9f6a59a20
commit
29ae492983
@ -23,7 +23,7 @@
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>PhoneGap</title>
|
||||
<link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title">
|
||||
<script type="text/javascript" charset="utf-8" src="cordova-2.0.0rc1.js"></script>
|
||||
<script type="text/javascript" charset="utf-8" src="cordova-2.0.0.js"></script>
|
||||
<script type="text/javascript" charset="utf-8" src="main.js"></script>
|
||||
|
||||
</head>
|
||||
|
@ -1,6 +1,6 @@
|
||||
// commit fd00bff18daf29606d88263f7586f20cf9421861
|
||||
// commit 114cf5304a74ff8f7c9ff1d21cf5652298af04b0
|
||||
|
||||
// File generated at :: Fri Jul 13 2012 15:09:46 GMT-0700 (PDT)
|
||||
// File generated at :: Wed Jul 18 2012 14:44:33 GMT-0700 (PDT)
|
||||
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
@ -289,17 +289,6 @@ var cordova = {
|
||||
}
|
||||
}
|
||||
},
|
||||
// TODO: remove in 2.0.
|
||||
addPlugin: function(name, obj) {
|
||||
console.log("[DEPRECATION NOTICE] window.addPlugin and window.plugins will be removed in version 2.0.");
|
||||
if (!window.plugins[name]) {
|
||||
window.plugins[name] = obj;
|
||||
}
|
||||
else {
|
||||
console.log("Error: Plugin "+name+" already exists.");
|
||||
}
|
||||
},
|
||||
|
||||
addConstructor: function(func) {
|
||||
channel.onCordovaReady.subscribeOnce(function() {
|
||||
try {
|
||||
@ -316,51 +305,6 @@ channel.onPause = cordova.addDocumentEventHandler('pause');
|
||||
channel.onResume = cordova.addDocumentEventHandler('resume');
|
||||
channel.onDeviceReady = cordova.addDocumentEventHandler('deviceready');
|
||||
|
||||
// Adds deprecation warnings to functions of an object (but only logs a message once)
|
||||
function deprecateFunctions(obj, objLabel) {
|
||||
var newObj = {};
|
||||
var logHash = {};
|
||||
for (var i in obj) {
|
||||
if (obj.hasOwnProperty(i)) {
|
||||
if (typeof obj[i] == 'function') {
|
||||
newObj[i] = (function(prop){
|
||||
var oldFunk = obj[prop];
|
||||
var funkId = objLabel + '_' + prop;
|
||||
return function() {
|
||||
if (!logHash[funkId]) {
|
||||
console.log('[DEPRECATION NOTICE] The "' + objLabel + '" global will be removed in version 2.0, please use lowercase "cordova".');
|
||||
logHash[funkId] = true;
|
||||
}
|
||||
oldFunk.apply(obj, arguments);
|
||||
};
|
||||
})(i);
|
||||
} else {
|
||||
newObj[i] = (function(prop) { return obj[prop]; })(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
return newObj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Legacy variable for plugin support
|
||||
* TODO: remove in 2.0.
|
||||
*/
|
||||
if (!window.PhoneGap) {
|
||||
window.PhoneGap = deprecateFunctions(cordova, 'PhoneGap');
|
||||
}
|
||||
if (!window.Cordova) {
|
||||
window.Cordova = deprecateFunctions(cordova, 'Cordova');
|
||||
}
|
||||
|
||||
/**
|
||||
* Plugins object
|
||||
* TODO: remove in 2.0.
|
||||
*/
|
||||
if (!window.plugins) {
|
||||
window.plugins = {};
|
||||
}
|
||||
|
||||
module.exports = cordova;
|
||||
|
||||
});
|
||||
@ -3524,12 +3468,12 @@ var accelerometer = {
|
||||
|
||||
var p;
|
||||
var win = function(a) {
|
||||
successCallback(a);
|
||||
removeListeners(p);
|
||||
successCallback(a);
|
||||
};
|
||||
var fail = function(e) {
|
||||
errorCallback(e);
|
||||
removeListeners(p);
|
||||
errorCallback(e);
|
||||
};
|
||||
|
||||
p = createCallbackPair(win, fail);
|
||||
@ -3561,8 +3505,8 @@ var accelerometer = {
|
||||
var id = utils.createUUID();
|
||||
|
||||
var p = createCallbackPair(function(){}, function(e) {
|
||||
errorCallback(e);
|
||||
removeListeners(p);
|
||||
errorCallback(e);
|
||||
});
|
||||
listeners.push(p);
|
||||
|
||||
@ -3577,7 +3521,10 @@ var accelerometer = {
|
||||
|
||||
if (running) {
|
||||
// If we're already running then immediately invoke the success callback
|
||||
successCallback(accel);
|
||||
// but only if we have retreived a value, sample code does not check for null ...
|
||||
if(accel) {
|
||||
successCallback(accel);
|
||||
}
|
||||
} else {
|
||||
start();
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<script src="cordova-2.0.0rc1.js"></script>
|
||||
<script src="cordova-2.0.0.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
@ -38,7 +38,7 @@ import android.telephony.TelephonyManager;
|
||||
public class Device extends Plugin {
|
||||
public static final String TAG = "Device";
|
||||
|
||||
public static String cordovaVersion = "2.0.0rc1"; // Cordova version
|
||||
public static String cordovaVersion = "2.0.0"; // Cordova version
|
||||
public static String platform = "Android"; // Device OS
|
||||
public static String uuid; // Device UUID
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user