Revert "[Device] fixed handle error" 79/71179/1
authorHyunjin Park <hj.na.park@samsung.com>
Tue, 24 May 2016 10:33:42 +0000 (03:33 -0700)
committerHyunjin Park <hj.na.park@samsung.com>
Tue, 24 May 2016 10:33:42 +0000 (03:33 -0700)
This reverts commit e938a6b86a4b508732f054b022085fa007ba36d8.

Change-Id: I302bc2a938ffa47d1432605c7ea4131e0be8df36

src/lib/plugins/cordova-plugin-device/tizen/Device.js

index ae1b591..34da27c 100755 (executable)
@@ -21,39 +21,14 @@ cordova.define(plugin_name, function(require, exports, module) {
 // TODO: remove -> end
 
 function DeviceInfo() {
-  try {
-    this.model = tizen.systeminfo.getCapability('http://tizen.org/system/model_name');
-    this.isVirtual = -1 !== this.model.toLowerCase().indexOf('emulator');
-  } catch (e) {
-    console.log(e);
-    this.model = undefined;
-    this.isVirtual = undefined;
-  }
-  try {
-    this.platform = tizen.systeminfo.getCapability('http://tizen.org/system/platform.name');
-  } catch (e) {
-    console.log(e);
-    this.platform = undefined;
-  }
-  try {
-    this.uuid = tizen.systeminfo.getCapability('http://tizen.org/system/tizenid');
-    this.serial = this.uuid;
-  } catch (e) {
-    console.log(e);
-    this.uuid = undefined;
-    this.serial = undefined;
-  }
-  try {
-    this.version = tizen.systeminfo.getCapability('http://tizen.org/feature/platform.version');
-  } catch (e) {
-    console.log(e);
-    this.version = undefined;
-  }
-  try {
-    this.manufacturer = tizen.systeminfo.getCapability('http://tizen.org/system/manufacturer');
-  } catch (e) {
-    console.log(e);
-    this.manufacturer = undefined;
+  this.cordovaVersion = require('cordova/platform').cordovaVersion;
+  this.model = tizen.systeminfo.getCapability('http://tizen.org/system/model_name');
+  this.platform = tizen.systeminfo.getCapability('http://tizen.org/system/platform.name');
+  this.uuid = tizen.systeminfo.getCapability('http://tizen.org/system/tizenid');
+  this.version = tizen.systeminfo.getCapability('http://tizen.org/feature/platform.version');
+  this.manufacturer = tizen.systeminfo.getCapability('http://tizen.org/system/manufacturer');
+  this.isVirtual = -1 !== this.model.toLowerCase().indexOf('emulator');
+  this.serial = this.uuid;
 }
 
 var di;