bool is_sub_app = false;
if (foreach_context == NULL) {
- app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL);
+ app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
return 0;
}
return app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL);
if (aul_app_get_running_app_info(app_context_foreach_app_context_cb, &foreach_context) != AUL_R_OK)
- return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
return APP_MANAGER_ERROR_NONE;
}
bool is_sub_app = false;
if (foreach_context == NULL) {
- app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL);
+ app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
return 0;
}
ret = aul_app_get_all_running_app_info(app_context_foreach_running_app_context_cb, &foreach_context);
if (ret != AUL_R_OK)
- return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
return APP_MANAGER_ERROR_NONE;
}
app_context_h app_context_created;
if (app_id == NULL || pid <= 0 || pkg_id == NULL || app_context == NULL)
- return app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
app_context_created = calloc(1, sizeof(struct app_context_s));
if (app_context_created == NULL)
- return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
app_context_created->app_id = strdup(app_id);
if (app_context_created->app_id == NULL) {
free(app_context_created);
- return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
}
app_context_created->pkg_id = strdup(pkg_id);
if (app_context_created->pkg_id == NULL) {
+ /* LCOV_EXCL_START */
free(app_context_created->app_id);
free(app_context_created);
return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ /* LCOV_EXCL_STOP */
}
if (instance_id) {
app_context_created->instance_id = strdup(instance_id);
if (app_context_created->instance_id == NULL) {
+ /* LCOV_EXCL_START */
free(app_context_created->pkg_id);
free(app_context_created->app_id);
free(app_context_created);
return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ /* LCOV_EXCL_STOP */
}
}
app_id_dup = strdup(app_context->app_id);
if (app_id_dup == NULL)
- return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
*app_id = app_id_dup;
pkg_id_dup = strdup(app_context->pkg_id);
if (pkg_id_dup == NULL)
- return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
*pkg_id = pkg_id_dup;
app_context->instance_id,
clone);
if (retval != APP_MANAGER_ERROR_NONE)
- return app_manager_error(retval, __FUNCTION__, NULL);
+ return app_manager_error(retval, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
return APP_MANAGER_ERROR_NONE;
}
if (event_cb_context != NULL && event_cb_context->pid_table != NULL) {
g_hash_table_insert(event_cb_context->pid_table, GINT_TO_POINTER(&(app_context_cloned->pid)), app_context_cloned);
} else {
+ /* LCOV_EXCL_START */
app_context_destroy(app_context_cloned);
app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, "invalid callback context");
+ /* LCOV_EXCL_STOP */
}
}
return app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL);
if (pkgmgrinfo_appinfo_get_usr_appinfo(app_id, getuid(), &appinfo) < 0)
- return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, "fail to get appinfo");
+ return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, "fail to get appinfo"); /* LCOV_EXCL_LINE */
if (pkgmgrinfo_appinfo_get_pkgid(appinfo, &pkg_id_dup) < 0) {
+ /* LCOV_EXCL_START */
pkgmgrinfo_appinfo_destroy_appinfo(appinfo);
return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, "fail to get pkgid");
+ /* LCOV_EXCL_STOP */
}
*pkg_id = strdup(pkg_id_dup);
return app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL);
if (app_context_get_pkgid_by_appid(app_id, &pkg_id) < 0)
- return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, "no such pkg_id");
+ return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, "no such pkg_id"); /* LCOV_EXCL_LINE */
app_context_lock_event_cb_context();
g_hash_table_insert(event_cb_context->pid_table, GINT_TO_POINTER(&(app_context->pid)), app_context);
event_cb_context->callback(app_context, APP_CONTEXT_EVENT_LAUNCHED, event_cb_context->user_data);
} else {
+ /* LCOV_EXCL_START */
app_context_destroy(app_context);
app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, "invalid callback context");
+ /* LCOV_EXCL_STOP */
}
}
g_hash_table_remove(event_cb_context->pid_table, GINT_TO_POINTER(&(app_context->pid)));
}
} else {
- app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, "invalid callback context");
+ app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, "invalid callback context"); /* LCOV_EXCL_LINE */
}
app_context_unlock_event_cb_context();
event_cb_context = calloc(1, sizeof(event_cb_context_s));
if (event_cb_context == NULL) {
+ /* LCOV_EXCL_START */
app_context_unlock_event_cb_context();
return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ /* LCOV_EXCL_STOP */
}
event_cb_context->pid_table = g_hash_table_new_full(g_int_hash, g_int_equal, NULL, app_context_pid_table_entry_destroyed_cb);
if (event_cb_context->pid_table == NULL) {
+ /* LCOV_EXCL_START */
free(event_cb_context);
event_cb_context = NULL;
app_context_unlock_event_cb_context();
return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, "failed to initialize pid-table");
+ /* LCOV_EXCL_STOP */
}
app_context_foreach_app_context(app_context_load_all_app_context_cb_locked, NULL);
info = calloc(1, sizeof(struct status_listen_info));
if (info == NULL) {
+ /* LCOV_EXCL_START */
LOGE("Out of memory");
return NULL;
+ /* LCOV_EXCL_STOP */
}
info->appid = strdup(appid);
if (info->appid == NULL) {
+ /* LCOV_EXCL_START */
LOGE("Out of memory");
free(info);
return NULL;
+ /* LCOV_EXCL_STOP */
}
info->callback = callback;
ret = aul_listen_app_status(appid, app_context_status_cb, info, &info->handle);
if (ret != AUL_R_OK) {
+ /* LCOV_EXCL_START */
__destroy_status_listen_info(info);
if (ret == AUL_R_EINVAL)
return APP_MANAGER_ERROR_INVALID_PARAMETER;
return APP_MANAGER_ERROR_IO_ERROR;
+ /* LCOV_EXCL_STOP */
}
status_listen_list = g_list_append(status_listen_list, info);
aul_app_get_running_app_instance_info(app_context_retrieve_app_context, &retrieval_context);
if (retrieval_context.matched == false)
- return app_manager_error(APP_MANAGER_ERROR_NO_SUCH_APP, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_NO_SUCH_APP, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
ret = app_context_create(retrieval_context.app_id,
retrieval_context.pid,
*instance_id = strdup(app_context->instance_id);
if (*instance_id == NULL)
- return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
return APP_MANAGER_ERROR_NONE;
}
app_context_table = g_hash_table_new_full(g_direct_hash, g_direct_equal,
NULL, (GDestroyNotify)app_context_destroy);
if (app_context_table == NULL)
- return APP_MANAGER_ERROR_OUT_OF_MEMORY;
+ return APP_MANAGER_ERROR_OUT_OF_MEMORY; /* LCOV_EXCL_LINE */
ret = aul_app_get_all_running_app_info(__foreach_app_context_cb, app_context_table);
if (ret != AUL_R_OK) {
+ /* LCOV_EXCL_START */
g_hash_table_destroy(app_context_table);
return APP_MANAGER_ERROR_IO_ERROR;
+ /* LCOV_EXCL_STOP */
}
ret = aul_window_stack_get(&handle);
if (ret < 0) {
+ /* LCOV_EXCL_START */
g_hash_table_destroy(app_context_table);
return APP_MANAGER_ERROR_IO_ERROR;
+ /* LCOV_EXCL_STOP */
}
ret = aul_window_stack_foreach(handle, __foreach_window_info_cb, &pid_list);
info = calloc(1, sizeof(struct app_info_s));
if (info == NULL)
- return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
foreach_context_s *foreach_context = user_data;
if (handle == NULL || foreach_context == NULL) {
+ /* LCOV_EXCL_START */
free(info);
return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL);
+ /* LCOV_EXCL_STOP */
}
retval = pkgmgrinfo_appinfo_get_appid(handle, &appid);
if (retval < 0) {
+ /* LCOV_EXCL_START */
free(info);
return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL);
+ /* LCOV_EXCL_STOP */
}
info->app_id = strdup(appid);
if (info->app_id == NULL) {
+ /* LCOV_EXCL_START */
if (info) {
free(info);
info = NULL;
}
return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ /* LCOV_EXCL_STOP */
}
info->pkg_app_info = handle;
bool iteration_next = true;
if (metadata_value == NULL || foreach_context == NULL)
- return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
iteration_next = foreach_context->callback(metadata_key, metadata_value, foreach_context->user_data);
if (iteration_next == true)
bool iteration_next = true;
if (category_name == NULL || foreach_category == NULL)
- return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
iteration_next = foreach_category->callback(category_name, foreach_category->user_data);
if (iteration_next == true)
ret = pkgmgrinfo_appinfo_get_appid(handle, &appid);
if (ret != PMINFO_R_OK) {
+ /* LCOV_EXCL_START */
app_manager_error(APP_MANAGER_ERROR_NO_SUCH_APP, __FUNCTION__, NULL);
return PMINFO_R_ERROR;
+ /* LCOV_EXCL_STOP */
}
app_info = calloc(1, sizeof(struct app_info_s));
if (app_info == NULL) {
+ /* LCOV_EXCL_START */
app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
return PMINFO_R_ERROR;
+ /* LCOV_EXCL_STOP */
}
app_info->app_id = strdup(appid);
ret = cynara_initialize(&p_cynara, NULL);
if (ret != CYNARA_API_SUCCESS) {
+ /* LCOV_EXCL_START */
LOGE("cynara_initialize [%d] failed!", ret);
return APP_MANAGER_ERROR_IO_ERROR;
+ /* LCOV_EXCL_STOP */
}
fd = open("/proc/self/attr/current", O_RDONLY);
if (fd < 0) {
+ /* LCOV_EXCL_START */
LOGE("open [%d] failed!", errno);
ret = APP_MANAGER_ERROR_IO_ERROR;
goto out;
+ /* LCOV_EXCL_STOP */
}
ret = read(fd, client, SMACK_LABEL_LEN);
if (ret < 0) {
+ /* LCOV_EXCL_START */
LOGE("read [%d] failed!", errno);
close(fd);
ret = APP_MANAGER_ERROR_IO_ERROR;
goto out;
+ /* LCOV_EXCL_STOP */
}
close(fd);
snprintf(uid, 10, "%d", getuid());
info = calloc(1, sizeof(struct app_info_s));
if (info == NULL)
- return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
if (aul_svc_get_appid_by_alias_appid(app_id, &real_appid) ==
AUL_SVC_RET_OK && real_appid != NULL) {
+ /* LCOV_EXCL_START */
retval = pkgmgrinfo_appinfo_get_usr_appinfo(real_appid,
getuid(), &appinfo);
free(real_appid);
*app_info = info;
return APP_MANAGER_ERROR_NONE;
}
+ /* LCOV_EXCL_STOP */
}
retval = pkgmgrinfo_appinfo_get_usr_appinfo(app_id, getuid(), &appinfo);
if (!retval) {
app_id_dup = strdup(app_info->app_id);
if (app_id_dup == NULL)
- return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
*app_id = app_id_dup;
app_exec_dup = strdup(val);
if (app_exec_dup == NULL)
- return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
*exec = app_exec_dup;
app_label_dup = strdup(val);
if (app_label_dup == NULL)
- return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
*label = app_label_dup;
app_label_dup = strdup(val);
if (app_label_dup == NULL) {
+ /* LCOV_EXCL_START */
if (val) {
free(val);
val = NULL;
}
return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ /* LCOV_EXCL_STOP */
}
*label = app_label_dup;
app_icon_dup = strdup(val);
if (app_icon_dup == NULL)
- return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
*path = app_icon_dup;
ret = pkgmgrinfo_appinfo_get_pkgname(app_info->pkg_app_info, &val);
if (ret < 0)
- return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
if (val == NULL)
return app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL);
app_package_dup = strdup(val);
if (app_package_dup == NULL)
- return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
*package = app_package_dup;
ret = pkgmgrinfo_appinfo_get_apptype(app_info->pkg_app_info, &val);
if (ret < 0)
- return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
if (val == NULL)
return app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL);
app_type_dup = strdup(val);
if (app_type_dup == NULL)
- return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
*type = app_type_dup;
info = calloc(1, sizeof(struct app_info_s));
if (info == NULL)
- return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
info->app_id = strdup(app_info->app_id);
if (info->app_id == NULL) {
+ /* LCOV_EXCL_START */
free(info);
return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ /* LCOV_EXCL_STOP */
}
if (pkgmgrinfo_appinfo_clone_appinfo(app_info->pkg_app_info, &(info->pkg_app_info)) < 0) {
+ /* LCOV_EXCL_START */
free(info->app_id);
free(info);
return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ /* LCOV_EXCL_STOP */
}
*clone = info;
retval = pkgmgrinfo_appinfo_filter_create(&filter_h);
if (retval < 0)
- return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
filter_created = calloc(1, sizeof(struct app_info_filter_s));
if (filter_created == NULL) {
+ /* LCOV_EXCL_START */
free(filter_h);
return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ /* LCOV_EXCL_STOP */
}
filter_created->pkg_app_info_filter = filter_h;
retval = pkgmgrinfo_appinfo_filter_destroy(handle->pkg_app_info_filter);
if (retval < 0)
- return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
free(handle);
return APP_MANAGER_ERROR_NONE;
retval = pkgmgrinfo_appinfo_filter_add_bool(handle->pkg_app_info_filter, converted_property, value);
if (retval < 0)
- return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
return APP_MANAGER_ERROR_NONE;
}
retval = pkgmgrinfo_appinfo_filter_add_string(handle->pkg_app_info_filter, converted_property, value);
if (retval < 0)
- return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
return APP_MANAGER_ERROR_NONE;
}
retval = pkgmgrinfo_appinfo_filter_count(handle->pkg_app_info_filter, count);
if (retval < 0)
- return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
return APP_MANAGER_ERROR_NONE;
}
retval = pkgmgrinfo_appinfo_usr_filter_foreach_appinfo(handle->pkg_app_info_filter, app_info_foreach_app_filter_cb, &foreach_context, getuid());
if (retval < 0)
- return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
return APP_MANAGER_ERROR_NONE;
}
filter_created = calloc(1, sizeof(struct app_info_metadata_filter_s));
if (filter_created == NULL)
- return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
retval = pkgmgrinfo_appinfo_metadata_filter_create(&filter_h);
if (retval < 0) {
+ /* LCOV_EXCL_START */
free(filter_created);
return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL);
+ /* LCOV_EXCL_STOP */
}
filter_created->pkg_app_info_metadata_filter = filter_h;
retval = pkgmgrinfo_appinfo_metadata_filter_destroy(handle->pkg_app_info_metadata_filter);
if (retval < 0)
- return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
free(handle);
return APP_MANAGER_ERROR_NONE;
retval = pkgmgrinfo_appinfo_metadata_filter_add(handle->pkg_app_info_metadata_filter, key, value);
if (retval < 0)
- return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
return APP_MANAGER_ERROR_NONE;
}
retval = pkgmgrinfo_appinfo_usr_metadata_filter_foreach(handle->pkg_app_info_metadata_filter, app_info_foreach_app_filter_cb, &foreach_context, getuid());
if (retval < 0)
- return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
return APP_MANAGER_ERROR_NONE;
}
app_id_dup = strdup(buffer);
if (app_id_dup == NULL)
- return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
*app_id = app_id_dup;
__FUNCTION__, NULL);
app_mgr_evt = (app_manager_event *)calloc(1, sizeof(app_manager_event));
- if (app_mgr_evt == NULL)
+ if (app_mgr_evt == NULL) {
+ /* LCOV_EXCL_START */
return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY,
__FUNCTION__, NULL);
+ /* LCOV_EXCL_STOP */
+ }
pc = pkgmgr_client_new(PC_LISTENING);
if (pc == NULL) {
+ /* LCOV_EXCL_START */
free(app_mgr_evt);
return app_manager_error(APP_MANAGER_ERROR_OUT_OF_MEMORY,
__FUNCTION__, NULL);
+ /* LCOV_EXCL_STOP */
}
app_mgr_evt->pc = pc;
ret = pkgmgr_client_set_status_type(handle->pc, pkgmgr_status_type);
if (ret != PKGMGR_R_OK) {
+ /* LCOV_EXCL_START */
LOGE("[%s] APP_MANAGER_ERROR_REQUEST_FAILED(0x%08x) : " \
"Failed to set event status", __FUNCTION__,
APP_MANAGER_ERROR_REQUEST_FAILED);
return APP_MANAGER_ERROR_REQUEST_FAILED;
+ /* LCOV_EXCL_STOP */
}
return APP_MANAGER_ERROR_NONE;
ret = pkgmgr_client_listen_app_status(handle->pc,
app_event_handler, handle);
if (ret < PKGMGR_R_OK) {
+ /* LCOV_EXCL_START */
LOGE("[%s] APP_MANAGER_ERROR_REQUEST_FAILED(0x%08x) : " \
"Failed to set event callback", __FUNCTION__,
APP_MANAGER_ERROR_REQUEST_FAILED);
return APP_MANAGER_ERROR_REQUEST_FAILED;
+ /* LCOV_EXCL_STOP */
}
handle->req_id = ret;
ret = pkgmgr_client_remove_listen_status(handle->pc);
if (ret != 0) {
+ /* LCOV_EXCL_START */
LOGE("[%s] APP_MANAGER_ERROR_REQUEST_FAILED(0x%08x) : " \
"Failed to unset event callback", __FUNCTION__,
APP_MANAGER_ERROR_REQUEST_FAILED);
return APP_MANAGER_ERROR_REQUEST_FAILED;
+ /* LCOV_EXCL_STOP */
}
return APP_MANAGER_ERROR_NONE;
ret = pkgmgr_client_free(handle->pc);
if (ret != 0) {
+ /* LCOV_EXCL_START */
LOGE("[%s] APP_MANAGER_ERROR_REQUEST_FAILED(0x%08x) : " \
"Failed to destroy handle", __FUNCTION__,
APP_MANAGER_ERROR_REQUEST_FAILED);
return APP_MANAGER_ERROR_REQUEST_FAILED;
+ /* LCOV_EXCL_STOP */
}
remove_app_manager_event_info_list(handle->head);
ret = aul_window_get_focused_pid(&pid);
if (ret != 0)
- return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL);
+ return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
if (pid < 0)
return app_manager_error(APP_MANAGER_ERROR_NO_SUCH_APP, __FUNCTION__, NULL);
ret = app_context_get_app_context_by_pid(pid, app_context);
if (ret != APP_MANAGER_ERROR_NONE)
- return app_manager_error(ret, __FUNCTION__, NULL);
+ return app_manager_error(ret, __FUNCTION__, NULL); /* LCOV_EXCL_LINE */
return APP_MANAGER_ERROR_NONE;
}
!= APP_MANAGER_ERROR_NONE)
return APP_MANAGER_ERROR_REQUEST_FAILED;
- if (strcasecmp(val, "ok") == 0)
+ if (strcasecmp(val, "ok") == 0) {
app_evt->event_cb(pkg_type, appid, event_type,
APP_MANAGER_EVENT_STATE_COMPLETED, app_evt, app_evt->user_data);
- else if (strcasecmp(val, "fail") == 0)
+ } else if (strcasecmp(val, "fail") == 0) {
+ /* LCOV_EXCL_START */
app_evt->event_cb(pkg_type, appid, event_type,
APP_MANAGER_EVENT_STATE_FAILED, app_evt, app_evt->user_data);
+ /* LCOV_EXCL_STOP */
+ }
ret = __remove_app_manager_event_info(&(app_evt->head), req_id);
if (ret != APP_MANAGER_ERROR_NONE) {
+ /* LCOV_EXCL_START */
LOGE("failed to remove app event info");
return APP_MANAGER_ERROR_REQUEST_FAILED;
+ /* LCOV_EXCL_STOP */
}
} else {