You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pp...@apache.org on 2013/06/06 17:07:09 UTC

[1/5] js commit: [TIZEN][SDK 2.1 - NECTARINE]

Updated Branches:
  refs/heads/master dcbd18980 -> 0a5fa1fa2


[TIZEN][SDK 2.1 - NECTARINE]

fix device , to circumvent an issue accessing the platformversion field of the SystemInfoCapabilities structure as returned by
systeminfo getCapabilities() method.

fix network, by setting a timeout handler provide an anwser before the 5 seconds timeout there is whithin Cordova
to get Connection information ready (timer is set to 3 sec)


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/523d9106
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/523d9106
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/523d9106

Branch: refs/heads/master
Commit: 523d9106f9dc1c4cec735893c87081ba3deeb57c
Parents: 11bdd38
Author: pplaquette <pp...@apache.org>
Authored: Wed Jun 5 16:56:54 2013 +0200
Committer: pplaquette <pp...@apache.org>
Committed: Wed Jun 5 16:56:54 2013 +0200

----------------------------------------------------------------------
 lib/tizen/plugin/tizen/Device.js        |   11 +++++------
 lib/tizen/plugin/tizen/NetworkStatus.js |   22 ++++++++++++++++++++--
 2 files changed, 25 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/523d9106/lib/tizen/plugin/tizen/Device.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/Device.js b/lib/tizen/plugin/tizen/Device.js
index 8b88dfb..fb10d9d 100644
--- a/lib/tizen/plugin/tizen/Device.js
+++ b/lib/tizen/plugin/tizen/Device.js
@@ -29,7 +29,7 @@ var channel = require('cordova/channel');
 //channel.waitForInitialization('onCordovaInfoReady');
 
 function Device() {
-    this.version = null;
+    this.version = "2.1.0"; // waiting a working solution of the security error see below
     this.uuid = null;
     this.name = null;
     this.model = null;
@@ -40,16 +40,15 @@ function Device() {
 }
 
 Device.prototype.getDeviceInfo = function() {
-    
+
     var deviceCapabilities =  tizen.systeminfo.getCapabilities();
-    
+
     if (deviceCapabilities) {
-        
-        this.version = deviceCapabilities.platformVersion;
+        // this.version = deviceCapabilities.platformVersion; // this is currently provoking a security Error in SDk 2.1
         this.uuid = deviceCapabilities.duid;
         this.model = deviceCapabilities.platformName;
         this.name = this.model;
-
+        
         channel.onCordovaInfoReady.fire();
      }
      else {

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/523d9106/lib/tizen/plugin/tizen/NetworkStatus.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/NetworkStatus.js b/lib/tizen/plugin/tizen/NetworkStatus.js
index 4ae75c3..febcbb9 100644
--- a/lib/tizen/plugin/tizen/NetworkStatus.js
+++ b/lib/tizen/plugin/tizen/NetworkStatus.js
@@ -30,9 +30,17 @@ module.exports = {
         var cncType = Connection.NONE;
         var infoCount = 0;
         var deviceCapabilities = null;
+        var timerId = 0;
+        var timeout = 300;
 
 
         function connectionCB() {
+        	
+        	if (timerId !== null) {
+                clearTimeout(timerId);
+                timerId = null;
+        	}jake
+        	
             infoCount++;
 
             if (infoCount > 1) {
@@ -64,14 +72,24 @@ module.exports = {
             connectionCB();
         }
 
+    
         deviceCapabilities = tizen.systeminfo.getCapabilities();
+        
+
+        timerId = setTimeout( function(){
+        	timerId = null;
+        	infoCount = 1;
+        	connectionCB();
+        }, timeout);
 
 
         if (deviceCapabilities.wifi) {
             tizen.systeminfo.getPropertyValue("WIFI_NETWORK", wifiSuccessCB, errorCB);
         }
-
-        tizen.systeminfo.getPropertyValue("CELLULAR_NETWORK", cellularSuccessCB, errorCB);
+        
+        if (deviceCapabilities.telephony) {
+        	tizen.systeminfo.getPropertyValue("CELLULAR_NETWORK", cellularSuccessCB, errorCB);
+        }
 
     }
 };


[5/5] js commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cordova-js

Posted by pp...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cordova-js


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/0a5fa1fa
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/0a5fa1fa
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/0a5fa1fa

Branch: refs/heads/master
Commit: 0a5fa1fa255e12625969cef1aaeecd1582e5b389
Parents: 7ac3024 dcbd189
Author: pplaquette <pp...@apache.org>
Authored: Thu Jun 6 17:04:45 2013 +0200
Committer: pplaquette <pp...@apache.org>
Committed: Thu Jun 6 17:04:45 2013 +0200

----------------------------------------------------------------------

----------------------------------------------------------------------



[3/5] js commit: CB-3420: add hidden option to InAppBrowser

Posted by pp...@apache.org.
CB-3420: add hidden option to InAppBrowser


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/421aff89
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/421aff89
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/421aff89

Branch: refs/heads/master
Commit: 421aff89471477f96d068b55e96be4960de19674
Parents: 8a84454
Author: David Kemp <dr...@dhcp-172-23-180-121.wat.corp.google.com>
Authored: Tue Jun 4 13:59:26 2013 -0400
Committer: pplaquette <pp...@apache.org>
Committed: Thu Jun 6 17:00:27 2013 +0200

----------------------------------------------------------------------
 lib/common/plugin/InAppBrowser.js |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/421aff89/lib/common/plugin/InAppBrowser.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/InAppBrowser.js b/lib/common/plugin/InAppBrowser.js
index 1640a82..5da53fd 100644
--- a/lib/common/plugin/InAppBrowser.js
+++ b/lib/common/plugin/InAppBrowser.js
@@ -41,6 +41,9 @@ InAppBrowser.prototype = {
     close: function (eventname) {
         exec(null, null, "InAppBrowser", "close", []);
     },
+    show: function (eventname) {
+      exec(null, null, "InAppBrowser", "show", []);
+    },
     addEventListener: function (eventname,f) {
         if (eventname in this.channels) {
             this.channels[eventname].subscribe(f);


[2/5] js commit: [Tizen][Tizen 2.1 - Nectarine] - Device.js

Posted by pp...@apache.org.
[Tizen][Tizen 2.1 - Nectarine] - Device.js

reenable the access to the platformVersion.

platform version is a field of SystemInfoDeviceCapability object returned by tizen device web runtime systeminfo getCapabilities() method

globally most of the systeminfo api went public in between Tizen SDK 2.1 beta and Tizen SDK 2.1 final (!)

except for 3 fields of the structure that are all related to version:

readonly attribute DOMString platformVersion;
readonly attribute DOMString webApiVersion;
readonly attribute DOMString nativeApiVersion;

to be able to access these field you need to add in the confg xml file of the application build:
 http://tizen.org/privilege/system
 (note  not "systeminfo" but system)


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/8a84454f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/8a84454f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/8a84454f

Branch: refs/heads/master
Commit: 8a84454f364260c666a5e2c26920b7a70b295f39
Parents: 523d910
Author: pplaquette <pp...@apache.org>
Authored: Thu Jun 6 16:25:56 2013 +0200
Committer: pplaquette <pp...@apache.org>
Committed: Thu Jun 6 16:25:56 2013 +0200

----------------------------------------------------------------------
 lib/tizen/plugin/tizen/Device.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/8a84454f/lib/tizen/plugin/tizen/Device.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/Device.js b/lib/tizen/plugin/tizen/Device.js
index fb10d9d..68cd24c 100644
--- a/lib/tizen/plugin/tizen/Device.js
+++ b/lib/tizen/plugin/tizen/Device.js
@@ -44,7 +44,7 @@ Device.prototype.getDeviceInfo = function() {
     var deviceCapabilities =  tizen.systeminfo.getCapabilities();
 
     if (deviceCapabilities) {
-        // this.version = deviceCapabilities.platformVersion; // this is currently provoking a security Error in SDk 2.1
+        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;


[4/5] js commit: [Tizen][Tizen SDK, 2.1 - Nectarine] - Device.js, NetworkStatus.js

Posted by pp...@apache.org.
[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/master
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);
         }
 
     }