ADS : 'ADS'
};
+var SystemInfoPropertyIdToFeature = {
+ BATTERY : 'http://tizen.org/feature/battery',
+ CAMERA_FLASH : 'http://tizen.org/feature/camera.back.flash',
+ CELLULAR_NETWORK : 'http://tizen.org/feature/network.telephony',
+ DISPLAY : 'http://tizen.org/feature/screen',
+ ETHERNET_NETWORK : 'http://tizen.org/feature/network.ethernet',
+ SIM : 'http://tizen.org/feature/network.telephony',
+ NET_PROXY_NETWORK : 'http://tizen.org/feature/network.net_proxy',
+ WIFI_NETWORK : 'http://tizen.org/feature/network.wifi'
+};
+
//class SystemInfoDeviceCapability ////////////////////////////////////////////////////
function SystemInfoDeviceCapability(data) {
Object.defineProperties(this, {
return propertyArray;
};
+var _checkPropertySupported = function(property){
+ if (SystemInfoPropertyIdToFeature[property]) {
+ var supported = tizen.systeminfo.getCapability(SystemInfoPropertyIdToFeature[property]);
+ if (!supported) {
+ return false;
+ }
+ }
+ return true;
+};
var getPropertyFunction = function(cppLabel, objectCreateFunction) {
return function() {
if (!propObject) {
throw new WebAPIException(WebAPIException.TYPE_MISMATCH_ERR, 'Property with id: ' + args.property + ' is not supported.');
}
+
+ if (_checkPropertySupported(args.property) === false) {
+ setTimeout(function() {
+ native_.callIfPossible(args.errorCallback,
+ new WebAPIException(WebAPIException.NOT_SUPPORTED_ERR,
+ 'Property with id: ' + args.property + ' is not supported.'));
+ }, 0);
+ return;
+ }
+
var callback = function(result) {
if (native_.isFailure(result)) {
setTimeout(function() {
}
]);
+ if (_checkPropertySupported(args.property) === false) {
+ setTimeout(function() {
+ native_.callIfPossible(args.errorCallback,
+ new WebAPIException(WebAPIException.NOT_SUPPORTED_ERR,
+ 'Property with id: ' + args.property + ' is not supported.'));
+ }, 0);
+ return;
+ }
+
var listener = {
callback : args.successCallback,
isArrayType : isArray,