cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [11/16] js commit: [Tizen][Tizen 2.1 - Nectarine] - Device.js
Date Mon, 10 Jun 2013 23:04:44 GMT
[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/3.0.0
Commit: 8a84454f364260c666a5e2c26920b7a70b295f39
Parents: 523d910
Author: pplaquette <pplaquette@apache.org>
Authored: Thu Jun 6 16:25:56 2013 +0200
Committer: pplaquette <pplaquette@apache.org>
Committed: Thu Jun 6 16:25:56 2013 +0200

----------------------------------------------------------------------
 lib/tizen/plugin/tizen/Device.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


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;


Mime
View raw message