Check support if we can
[platform/core/api/runtime-info.git] / src / runtime_info_system.c
index 74f0ffe..cd9d678 100644 (file)
@@ -94,6 +94,8 @@ int runtime_info_auto_rotation_enabled_get_value(runtime_info_value_h value)
        int vconf_value;
        int ret;
 
+       RETURN_ERROR_IF_NOT_SUPPORTED("http://tizen.org/feature/screen.auto_rotation");
+
        ret = runtime_info_vconf_get_value_bool(VCONF_ROTATION_LOCK_ENABLED, &vconf_value);
        if (ret == RUNTIME_INFO_ERROR_NONE)
                value->b = (bool)vconf_value;
@@ -116,6 +118,8 @@ int runtime_info_battery_charging_get_value(runtime_info_value_h value)
        int vconf_value;
        int ret;
 
+       RETURN_ERROR_IF_NOT_SUPPORTED("http://tizen.org/feature/battery");
+
        ret = runtime_info_vconf_get_value_int(VCONF_BATTERY_CHARGING, &vconf_value);
        if (ret == RUNTIME_INFO_ERROR_NONE)
                value->b = vconf_value;
@@ -237,6 +241,8 @@ int runtime_info_charger_connected_get_value(runtime_info_value_h value)
        int vconf_value;
        int ret;
 
+       RETURN_ERROR_IF_NOT_SUPPORTED("http://tizen.org/feature/battery");
+
        ret = runtime_info_vconf_get_value_int(VCONF_CHARGER_CONNECTED, &vconf_value);
        if (ret != RUNTIME_INFO_ERROR_NONE)
                return ret;