You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2013/06/11 01:04:46 UTC
[13/16] js commit: [Tizen][Tizen SDK, 2.1 - Nectarine] - Device.js,
NetworkStatus.js
[Tizen][Tizen SDK, 2.1 - Nectarine] - Device.js, NetworkStatus.js
fixwhitespace patrol
remove device name...
Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/7ac3024f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/7ac3024f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/7ac3024f
Branch: refs/heads/3.0.0
Commit: 7ac3024fb6def9c8fb9b4dca1faf266812b51292
Parents: 421aff8
Author: pplaquette <pp...@apache.org>
Authored: Thu Jun 6 17:03:05 2013 +0200
Committer: pplaquette <pp...@apache.org>
Committed: Thu Jun 6 17:03:05 2013 +0200
----------------------------------------------------------------------
lib/tizen/plugin/tizen/Device.js | 2 --
lib/tizen/plugin/tizen/NetworkStatus.js | 22 +++++++++++-----------
2 files changed, 11 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/7ac3024f/lib/tizen/plugin/tizen/Device.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/Device.js b/lib/tizen/plugin/tizen/Device.js
index 68cd24c..dad43a9 100644
--- a/lib/tizen/plugin/tizen/Device.js
+++ b/lib/tizen/plugin/tizen/Device.js
@@ -31,7 +31,6 @@ var channel = require('cordova/channel');
function Device() {
this.version = "2.1.0"; // waiting a working solution of the security error see below
this.uuid = null;
- this.name = null;
this.model = null;
this.cordova = CORDOVA_JS_BUILD_LABEL;
this.platform = "Tizen";
@@ -47,7 +46,6 @@ Device.prototype.getDeviceInfo = function() {
this.version = deviceCapabilities.platformVersion; // requires http://tizen.org/privilege/system (and not "systeminfo") privileges to be added in config.xml
this.uuid = deviceCapabilities.duid;
this.model = deviceCapabilities.platformName;
- this.name = this.model;
channel.onCordovaInfoReady.fire();
}
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/7ac3024f/lib/tizen/plugin/tizen/NetworkStatus.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/NetworkStatus.js b/lib/tizen/plugin/tizen/NetworkStatus.js
index febcbb9..58cafa8 100644
--- a/lib/tizen/plugin/tizen/NetworkStatus.js
+++ b/lib/tizen/plugin/tizen/NetworkStatus.js
@@ -35,12 +35,12 @@ module.exports = {
function connectionCB() {
-
- if (timerId !== null) {
+
+ if (timerId !== null) {
clearTimeout(timerId);
timerId = null;
- }jake
-
+ }jake
+
infoCount++;
if (infoCount > 1) {
@@ -72,23 +72,23 @@ module.exports = {
connectionCB();
}
-
+
deviceCapabilities = tizen.systeminfo.getCapabilities();
-
+
timerId = setTimeout( function(){
- timerId = null;
- infoCount = 1;
- connectionCB();
+ timerId = null;
+ infoCount = 1;
+ connectionCB();
}, timeout);
if (deviceCapabilities.wifi) {
tizen.systeminfo.getPropertyValue("WIFI_NETWORK", wifiSuccessCB, errorCB);
}
-
+
if (deviceCapabilities.telephony) {
- tizen.systeminfo.getPropertyValue("CELLULAR_NETWORK", cellularSuccessCB, errorCB);
+ tizen.systeminfo.getPropertyValue("CELLULAR_NETWORK", cellularSuccessCB, errorCB);
}
}