{
runtime_info_item_h runtime_info_item;
runtime_info_func_get_value get_value;
+ int ret;
if (runtime_info_get_item(key, &runtime_info_item)) {
LOGE("INVALID_PARAMETER(0x%08x) : invalid key", RUNTIME_INFO_ERROR_INVALID_PARAMETER);
return RUNTIME_INFO_ERROR_IO_ERROR;
}
- if (get_value(value) != RUNTIME_INFO_ERROR_NONE) {
- LOGE("IO_ERROR(0x%08x) : failed to get the runtime informaion / key(%d)", RUNTIME_INFO_ERROR_IO_ERROR, key);
- return RUNTIME_INFO_ERROR_IO_ERROR;
+ ret = get_value(value);
+ if (ret != RUNTIME_INFO_ERROR_NONE) {
+ LOGE("ERROR(0x%08x) : fail to get the runtime information / key(%d)", ret, key);
+ return ret;
}
return RUNTIME_INFO_ERROR_NONE;
if (runtime_info_vconf_get_value_int(VCONF_BATTERY_CHARGING, &vconf_value))
return RUNTIME_INFO_ERROR_IO_ERROR;
+ /* regard not supported as disconnected */
+ if (vconf_value == -ENOTSUP)
+ vconf_value = false;
+
value->b = vconf_value;
return RUNTIME_INFO_ERROR_NONE;
switch (vconf_value) {
case VCONFKEY_SYSMAN_CHARGER_DISCONNECTED:
+ /* regard not supported as disconnected */
+ case -ENOTSUP:
value->b = false;
break;