You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2012/01/03 19:57:11 UTC
[42/50] git commit: Remove old code.
Remove old code.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/0caca9ae
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/0caca9ae
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/0caca9ae
Branch: refs/heads/master
Commit: 0caca9ae5576e9699769c36f401112670afc6e26
Parents: 0bbcf5c
Author: Bryce Curtis <cu...@gmail.com>
Authored: Wed Nov 9 15:46:45 2011 -0600
Committer: Bryce Curtis <cu...@gmail.com>
Committed: Wed Nov 9 15:46:45 2011 -0600
----------------------------------------------------------------------
framework/assets/js/phonegap.js.base | 66 -----------------------------
1 files changed, 0 insertions(+), 66 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/0caca9ae/framework/assets/js/phonegap.js.base
----------------------------------------------------------------------
diff --git a/framework/assets/js/phonegap.js.base b/framework/assets/js/phonegap.js.base
index 3c1c6c6..01a61a5 100755
--- a/framework/assets/js/phonegap.js.base
+++ b/framework/assets/js/phonegap.js.base
@@ -50,21 +50,12 @@ if (typeof PhoneGap === "undefined") {
* window.onunload
*/
-if (typeof(DeviceInfo) !== 'object') {
- var DeviceInfo = {};
-}
-
/**
* This represents the PhoneGap API itself, and provides a global namespace for accessing
* information about the state of PhoneGap.
* @class
*/
var PhoneGap = {
- queue: {
- ready: true,
- commands: [],
- timer: null
- },
documentEventHandler: {}, // Collection of custom document event handlers
windowEventHandler: {} // Collection of custom window event handlers
};
@@ -207,11 +198,6 @@ PhoneGap.Channel.join = function(h, c) {
};
/**
- * Boolean flag indicating if the PhoneGap API is available and initialized.
- */ // TODO: Remove this, it is unused here ... -jm
-PhoneGap.available = DeviceInfo.uuid !== undefined;
-
-/**
* Add an initialization function to a queue that ensures it will run and initialize
* application constructors only once PhoneGap has been initialized.
* @param {Function} func The function callback you want run once PhoneGap is initialized
@@ -738,58 +724,6 @@ PhoneGap.callbackError = function(callbackId, args) {
}
};
-
-/**
- * Internal function used to dispatch the request to PhoneGap. It processes the
- * command queue and executes the next command on the list. If one of the
- * arguments is a JavaScript object, it will be passed on the QueryString of the
- * url, which will be turned into a dictionary on the other end.
- * @private
- */
-// TODO: Is this used?
-PhoneGap.run_command = function() {
- if (!PhoneGap.available || !PhoneGap.queue.ready) {
- return;
- }
- PhoneGap.queue.ready = false;
-
- var args = PhoneGap.queue.commands.shift();
- if (PhoneGap.queue.commands.length === 0) {
- clearInterval(PhoneGap.queue.timer);
- PhoneGap.queue.timer = null;
- }
-
- var uri = [];
- var dict = null;
- var i;
- for (i = 1; i < args.length; i++) {
- var arg = args[i];
- if (arg === undefined || arg === null) {
- arg = '';
- }
- if (typeof(arg) === 'object') {
- dict = arg;
- } else {
- uri.push(encodeURIComponent(arg));
- }
- }
- var url = "gap://" + args[0] + "/" + uri.join("/");
- if (dict !== null) {
- var name;
- var query_args = [];
- for (name in dict) {
- if (dict.hasOwnProperty(name) && (typeof (name) === 'string')) {
- query_args.push(encodeURIComponent(name) + "=" + encodeURIComponent(dict[name]));
- }
- }
- if (query_args.length > 0) {
- url += "?" + query_args.join("&");
- }
- }
- document.location = url;
-
-};
-
PhoneGap.JSCallbackPort = null;
PhoneGap.JSCallbackToken = null;