ret = vconf_get_int(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW, &val);
/* regard not supported as disconnected */
if (val == -ENOTSUP)
- val = 0;
+ val = 0; //LCOV_EXCL_LINE System Error
else if (ret < 0 || val < 0 || val > 1)
return DEVICE_ERROR_OPERATION_FAILED;
*status = DEVICE_BATTERY_LEVEL_HIGH;
else if (val == VCONFKEY_SYSMAN_BAT_LEVEL_FULL)
*status = DEVICE_BATTERY_LEVEL_FULL;
+//LCOV_EXCL_START System Error
/* regard not supported as disconnected */
else if (val == -ENOTSUP)
*status = DEVICE_BATTERY_LEVEL_EMPTY;
+//LCOV_EXCL_STOP
else
return DEVICE_ERROR_OPERATION_FAILED;
METHOD_GET_INFO, NULL, NULL, &output);
/* regard not suppoted as disconnected */
if (ret == -ENOTSUP)
- ret = 0;
+ ret = 0; //LCOV_EXCL_LINE System Error
else if (ret < 0)
- return errno_to_device_error(ret);
+ return errno_to_device_error(ret); //LCOV_EXCL_LINE System Error
g_variant_get(output, "(isssiiiii)", &ret,
&status, &health, &power_source,
¤t_now, ¤t_average);
if (ret < 0) {
+//LCOV_EXCL_START System Error
ret = errno_to_device_error(ret);
goto out;
+//LCOV_EXCL_STOP
}
snprintf(info->status, sizeof(info->status), "%s", status);
ret = device_battery_get_info(&info);
if (ret != DEVICE_ERROR_NONE) {
- _E("Failed to get battery info (%d)", ret);
+ _E("Failed to get battery info (%d)", ret); //LCOV_EXCL_LINE Logs
return ret;
}
ret = device_battery_get_info(&info);
if (ret != DEVICE_ERROR_NONE) {
- _E("Failed to get battery info (%d)", ret);
+ _E("Failed to get battery info (%d)", ret); //LCOV_EXCL_LINE Logs
return ret;
}
ret = device_battery_get_info(&info);
if (ret != DEVICE_ERROR_NONE) {
- _E("Failed to get battery info (%d)", ret);
+ _E("Failed to get battery info (%d)", ret); //LCOV_EXCL_LINE Logs
return ret;
}
ret = device_battery_get_info(&info);
if (ret != DEVICE_ERROR_NONE) {
- _E("Failed to get battery info (%d)", ret);
+ _E("Failed to get battery info (%d)", ret); //LCOV_EXCL_LINE Logs
return ret;
}
/* open conf file */
f = fopen(file_name, "r");
if (!f) {
+//LCOV_EXCL_START System Error
if (errno == ENOENT) {
_I("There is no power config file");
+//LCOV_EXCL_STOP
return 0;
}
return 0;
error:
+//LCOV_EXCL_START System Error
if (f)
fclose(f);
_E("Failed to read %s:%d!", file_name, lineno);
+//LCOV_EXCL_STOP
return ret;
}
struct proxy_node *node;
if (!dest || !path || !interface) {
+//LCOV_EXCL_START System Error
if (err)
g_set_error(err, G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
"Cannot determine destination address");
+//LCOV_EXCL_STOP
return NULL;
}
pthread_mutex_lock(&dmutex);
proxy = get_proxy_from_proxy_pool(dest, path, interface, &err);
- if (!proxy) {
//LCOV_EXCL_START System Error
+ if (!proxy) {
pthread_mutex_unlock(&dmutex);
_E("fail to get proxy from proxy pool : %s-%s (%d-%s)",
interface, method, err->code, err->message);
result = g_dbus_error_to_errno(err->code);
g_clear_error(&err);
return result;
-//LCOV_EXCL_STOP
}
-
+//LCOV_EXCL_STOP
output = g_dbus_proxy_call_sync(proxy,
method, /* method name */
var, /* parameters */
&err);
pthread_mutex_unlock(&dmutex);
- if (!output) {
//LCOV_EXCL_START System Error
+ if (!output) {
if (!err) {
_E("g_dbus_proxy_call_sync error : %s-%s",
interface, method);
&err);
pthread_mutex_unlock(&dmutex);
if (!output) {
- if (!err) {
//LCOV_EXCL_START System Error
+ if (!err) {
_E("g_dbus_proxy_call_sync error : %s-%s",
interface, method);
return -EPERM;
return DEVICE_ERROR_NONE;
}
+//LCOV_EXCL_START Not used function
int device_display_get_max_brightness_state(int display_index, display_state_e state, int *brightness)
{
char *arr[1];
return DEVICE_ERROR_NONE;
}
+//LCOV_EXCL_STOP
+//LCOV_EXCL_START Not used function
int device_display_get_brightness_state(int display_index, display_state_e state, int *brightness)
{
char *arr[1];
return DEVICE_ERROR_NONE;
}
+//LCOV_EXCL_STOP
+//LCOV_EXCL_START Not used function
int device_display_set_brightness_state(int display_index, display_state_e state, int brightness)
{
char *arr[2];
return DEVICE_ERROR_NONE;
}
+//LCOV_EXCL_STOP
ret = system_info_get_platform_bool(IR_FEATURE, &ir_avail);
if (ret < 0) {
+//LCOV_EXCL_START System Error
*available = false;
return DEVICE_ERROR_OPERATION_FAILED;
+//LCOV_EXCL_STOP
} else if (ret == 0 && !ir_avail) {
*available = false;
return DEVICE_ERROR_NOT_SUPPORTED;
_E("IR is not supported"); //LCOV_EXCL_LINE
return DEVICE_ERROR_OPERATION_FAILED;
}
-
+//LCOV_EXCL_START System Error
if (!pattern)
return DEVICE_ERROR_INVALID_PARAMETER;
if (size <= 0) {
- _E("IR pattern size is invalid"); //LCOV_EXCL_LINE
+ _E("IR pattern size is invalid");
return DEVICE_ERROR_INVALID_PARAMETER;
}
-
+//LCOV_EXCL_STOP
freq_pattern[0] = carrier_frequency;
for (i = 1; i <= size; i++)
freq_pattern[i] = pattern[i-1];
ret = dbus_method_sync(DEVICED_BUS_NAME,
DEVICED_PATH_LED, DEVICED_INTERFACE_LED,
METHOD_PLAY_CUSTOM, "iiuu", arr);
+//LCOV_EXCL_START System Error
if (ret < 0)
return errno_to_device_error(ret);
-
+//LCOV_EXCL_STOP
return DEVICE_ERROR_NONE;
}
return DEVICE_ERROR_NONE;
}
+//LCOV_EXCL_START Not used function
int device_multi_led_get_number(int *num_of_leds)
{
int ret;
return dbus_method_sync_var(DEVICED_BUS_NAME, DEVICED_PATH_LED,
DEVICED_INTERFACE_LED, METHOD_MULTI_PLAY_CUSTOM, var);
}
+//LCOV_EXCL_STOP
if (!TIZEN_FEATURE_TRACKER)
return;
if (off_lock_timeout) {
- _I("Power lock timeout handler removed");
+ _I("Power lock timeout handler removed"); //LCOV_EXCL_LINE Logs
g_source_remove(off_lock_timeout);
off_lock_timeout = 0;
}
if (!TIZEN_FEATURE_TRACKER)
return;
if (padding_timeout) {
- _I("Padding timeout handler removed");
+ _I("Padding timeout handler removed"); //LCOV_EXCL_LINE Logs
g_source_remove(padding_timeout);
padding_timeout = 0;
}
remove_off_lock_timeout();
remove_padding_timeout();
- _I("Power lock timeout handler added");
+ _I("Power lock timeout handler added"); //LCOV_EXCL_LINE Logs
id = g_timeout_add(lock_timeout.release,
off_lock_timeout_expired, NULL);
if (id)
off_lock_timeout = id;
else
- _E("Failed to add Power Lock timeout handler");
+ _E("Failed to add Power Lock timeout handler"); //LCOV_EXCL_LINE Logs
}
static void lock_cb(void *data, GVariant *result, GError *err)
int ret;
if (!result) {
- _E("no message : %s", err->message); //LCOV_EXCL_LINE
+//LCOV_EXCL_START System Error
+ _E("no message : %s", err->message);
return;
+//LCOV_EXCL_STOP
}
g_variant_get(result, "(i)", &ret);
METHOD_LOCK_STATE, "sssi", arr);
if (ret == -EACCES || ret == -ECOMM || ret == -EPERM) {
privilege = 0;
- return -EACCES;
+ return -EACCES; //LCOV_EXCL_LINE System Error
} else
privilege = 1;
}
int ret;
if (!result) {
- _E("no message : %s", err->message); //LCOV_EXCL_LINE
+//LCOV_EXCL_START System Error
+ _E("no message : %s", err->message);
return;
+//LCOV_EXCL_STOP
}
g_variant_get(result, "(i)", &ret);
ret = dbus_method_sync(DEVICED_BUS_NAME,
DEVICED_PATH_DISPLAY, DEVICED_INTERFACE_DISPLAY,
METHOD_UNLOCK_STATE, "ss", arr);
+//LCOV_EXCL_START System Error
if (ret == -EACCES || ret == -ECOMM || ret == -EPERM) {
privilege = 0;
return -EACCES;
+//LCOV_EXCL_STOP
} else
privilege = 1;
}