"app_background_category INTEGER DEFAULT 0, " \
"app_root_path text, " \
"app_api_version text, " \
+ "app_effective_appid text, " \
"FOREIGN KEY(package) " \
"REFERENCES package_info(package) " \
"ON DELETE CASCADE)"
return ret;
}
+static const char *__find_effective_appid(GList *metadata_list)
+{
+ GList *tmp_list;
+ metadata_x *md;
+
+ for (tmp_list = metadata_list; tmp_list; tmp_list = tmp_list->next) {
+ md = (metadata_x *)tmp_list->data;
+ if (md == NULL || md->key == NULL)
+ continue;
+
+ if (strcmp(md->key, "http://tizen.org/metadata/effective-appid") == 0) {
+ if (md->value)
+ return md->value;
+ }
+ }
+
+ return NULL;
+}
+
/* _PRODUCT_LAUNCHING_ENHANCED_
* app->indicatordisplay, app->portraitimg, app->landscapeimg, app->guestmode_appstatus
*/
int background_value = 0;
char query[MAX_QUERY_LEN] = {'\0'};
char *type = NULL;
+ const char *effective_appid;
if (mfx->type)
type = strdup(mfx->type);
background_value = 0;
}
+ effective_appid = __find_effective_appid(app->metadata);
+
snprintf(query, MAX_QUERY_LEN,
"insert into package_app_info(" \
"app_id, app_component, app_exec, app_nodisplay, app_type, " \
"app_indicatordisplay, app_portraitimg, app_landscapeimg, app_guestmodevisibility, app_permissiontype, " \
"app_preload, app_submode, app_submode_mainid, app_installed_storage, app_process_pool, " \
"app_launch_mode, app_ui_gadget, app_support_disable, component_type, package, " \
- "app_tep_name, app_background_category, app_package_type, app_root_path, app_api_version) " \
+ "app_tep_name, app_background_category, app_package_type, app_root_path, app_api_version, " \
+ "app_effective_appid) " \
"values(" \
"'%s', '%s', '%s', '%s', '%s', " \
"'%s', '%s', '%s', '%s', '%s', " \
"'%s', '%s', '%s', '%s', '%s', " \
"'%s', '%s', '%s', '%s', '%s', " \
"'%s', '%s', '%s', '%s', '%s', " \
- "'%s', '%d', '%s', '%s', '%s')", \
+ "'%s', '%d', '%s', '%s', '%s', " \
+ "'%s')", \
app->appid, app->component_type, app->exec, app->nodisplay, app->type,
app->onboot, app->multiple, app->autorestart, app->taskmanage, app->enabled,
app->hwacceleration, app->screenreader, app->mainapp, __get_str(app->recentimage), app->launchcondition,
app->guestmode_visibility, app->permission_type,
mfx->preload, app->submode, __get_str(app->submode_mainid), mfx->installed_storage, app->process_pool,
app->launch_mode, app->ui_gadget, mfx->support_disable, app->component_type, mfx->package,
- __get_str(mfx->tep_name), background_value, type, mfx->root_path, __get_str(mfx->api_version));
+ __get_str(mfx->tep_name), background_value, type, mfx->root_path, __get_str(mfx->api_version),
+ __get_str(effective_appid));
ret = __exec_query(query);
if (ret == -1) {
"app_support_disable, "
"component_type, package, app_process_pool, app_installed_storage, "
"app_background_category, app_package_type, "
- "app_root_path, app_api_version "
+ "app_root_path, app_api_version, app_effective_appid "
"FROM package_app_info WHERE app_id='%s' "
"AND (app_disable='%s' "
"%s app_id %s IN "
_save_column_str(stmt, idx++, &info->package_type);
_save_column_str(stmt, idx++, &info->root_path);
_save_column_str(stmt, idx++, &info->api_version);
+ _save_column_str(stmt, idx++, &info->effective_appid);
info->background_category = __get_background_category(bg_category_str);
free(bg_category_str);
"app_hwacceleration, app_permissiontype, app_preload, "
"app_installed_storage, app_process_pool, app_launch_mode, "
"app_package_type, component_type, package, app_tep_name, "
- "app_background_category, app_root_path, app_api_version "
+ "app_background_category, app_root_path, app_api_version, "
+ "app_effective_appid "
"FROM package_app_info WHERE app_disable='false' AND app_id NOT IN "
"(SELECT app_id FROM package_app_disable_for_user WHERE uid='%d')",
(int)getuid());
_save_column_str(stmt, idx++, &bg_category_str);
_save_column_str(stmt, idx++, &appinfo->root_path);
_save_column_str(stmt, idx++, &appinfo->api_version);
+ _save_column_str(stmt, idx++, &appinfo->effective_appid);
appinfo->background_category = __get_background_category(bg_category_str);
free(bg_category_str);
app_info->launch_mode = strdup(data->launch_mode);
if (data->package_type != NULL)
app_info->package_type = strdup(data->package_type);
+ if (data->effective_appid != NULL)
+ app_info->effective_appid = strdup(data->effective_appid);
/* GList */
ret = 0;