int operation_count;
int uri_count;
int mime_count;
+ int subapp_count;
char **operation;
char **uri;
char **mime;
+ char **subapp;
} pkgmgrinfo_appcontrol_x;
typedef int (*sqlite_query_callback)(void *data, int ncols, char **coltxt, char **colname);
case E_PMINFO_APPINFO_PROP_APP_HWACCELERATION:
snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_hwacceleration='%s'", node->value);
break;
+ case E_PMINFO_APPINFO_PROP_APP_SCREENREADER:
+ snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_screenreader='%s'", node->value);
+ break;
case E_PMINFO_APPINFO_PROP_APP_LAUNCHCONDITION:
snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_launchcondition IN %s", node->value);
break;
info->manifest_info->uiapplication->hwacceleration = strdup(coltxt[i]);
else
info->manifest_info->uiapplication->hwacceleration = NULL;
+ } else if (strcmp(colname[i], "app_screenreader") == 0 ){
+ if (coltxt[i])
+ info->manifest_info->uiapplication->screenreader = strdup(coltxt[i]);
+ else
+ info->manifest_info->uiapplication->screenreader = NULL;
} else if (strcmp(colname[i], "app_indicatordisplay") == 0 ){
if (coltxt[i])
info->manifest_info->uiapplication->indicatordisplay = strdup(coltxt[i]);
info->manifest_info->uiapplication->icon->text = strdup(coltxt[i]);
else
info->manifest_info->uiapplication->icon->text = NULL;
+ } else if (strcmp(colname[i], "app_enabled") == 0 ) {
+ if (coltxt[i])
+ info->manifest_info->uiapplication->enabled= strdup(coltxt[i]);
+ else
+ info->manifest_info->uiapplication->enabled = NULL;
} else if (strcmp(colname[i], "app_label") == 0 ) {
if (coltxt[i])
info->manifest_info->uiapplication->label->text = strdup(coltxt[i]);
info->manifest_info->uiapplication->permission_type = strdup(coltxt[i]);
else
info->manifest_info->uiapplication->permission_type = NULL;
+ } else if (strcmp(colname[i], "component_type") == 0 ) {
+ if (coltxt[i])
+ info->manifest_info->uiapplication->component_type = strdup(coltxt[i]);
+ else
+ info->manifest_info->uiapplication->component_type = NULL;
+ } else if (strcmp(colname[i], "app_preload") == 0 ) {
+ if (coltxt[i])
+ info->manifest_info->uiapplication->preload = strdup(coltxt[i]);
+ else
+ info->manifest_info->uiapplication->preload = NULL;
+ } else if (strcmp(colname[i], "app_submode") == 0 ) {
+ if (coltxt[i])
+ info->manifest_info->uiapplication->submode = strdup(coltxt[i]);
+ else
+ info->manifest_info->uiapplication->submode = NULL;
+ } else if (strcmp(colname[i], "app_submode_mainid") == 0 ) {
+ if (coltxt[i])
+ info->manifest_info->uiapplication->submode_mainid = strdup(coltxt[i]);
+ else
+ info->manifest_info->uiapplication->submode_mainid = NULL;
} else
continue;
}
info->manifest_info->uiapplication->hwacceleration = strdup(coltxt[i]);
else
info->manifest_info->uiapplication->hwacceleration = NULL;
+ } else if (strcmp(colname[i], "app_screenreader") == 0 ){
+ if (coltxt[i])
+ info->manifest_info->uiapplication->screenreader = strdup(coltxt[i]);
+ else
+ info->manifest_info->uiapplication->screenreader = NULL;
} else if (strcmp(colname[i], "app_indicatordisplay") == 0 ){
if (coltxt[i])
info->manifest_info->uiapplication->indicatordisplay = strdup(coltxt[i]);
info->manifest_info->installed_time = strdup(coltxt[i]);
else
info->manifest_info->installed_time = NULL;
+ } else if (strcmp(colname[i], "installed_storage") == 0 ){
+ if (coltxt[i])
+ info->manifest_info->installed_storage = strdup(coltxt[i]);
+ else
+ info->manifest_info->installed_storage = NULL;
} else if (strcmp(colname[i], "mainapp_id") == 0 ){
if (coltxt[i])
info->manifest_info->mainapp_id = strdup(coltxt[i]);
info->manifest_info->root_path = strdup(coltxt[i]);
else
info->manifest_info->root_path = NULL;
+ } else if (strcmp(colname[i], "csc_path") == 0 ){
+ if (coltxt[i])
+ info->manifest_info->csc_path = strdup(coltxt[i]);
+ else
+ info->manifest_info->csc_path = NULL;
} else if (strcmp(colname[i], "privilege") == 0 ){
if (coltxt[i])
info->manifest_info->privileges->privilege->text = strdup(coltxt[i]);
info->uiapp_info->hwacceleration = strdup(coltxt[i]);
else
info->uiapp_info->hwacceleration = NULL;
+ } else if (strcmp(colname[i], "app_screenreader") == 0 ) {
+ if (coltxt[i])
+ info->uiapp_info->screenreader = strdup(coltxt[i]);
+ else
+ info->uiapp_info->screenreader = NULL;
} else if (strcmp(colname[i], "app_enabled") == 0 ) {
if (coltxt[i])
info->uiapp_info->enabled= strdup(coltxt[i]);
info->uiapp_info->permission_type = strdup(coltxt[i]);
else
info->uiapp_info->permission_type = NULL;
+ } else if (strcmp(colname[i], "component_type") == 0 ) {
+ if (coltxt[i])
+ info->uiapp_info->component_type = strdup(coltxt[i]);
+ else
+ info->uiapp_info->component_type = NULL;
+ } else if (strcmp(colname[i], "app_preload") == 0 ) {
+ if (coltxt[i])
+ info->uiapp_info->preload = strdup(coltxt[i]);
+ else
+ info->uiapp_info->preload = NULL;
+ } else if (strcmp(colname[i], "app_submode") == 0 ) {
+ if (coltxt[i])
+ info->uiapp_info->submode = strdup(coltxt[i]);
+ else
+ info->uiapp_info->submode = NULL;
+ } else if (strcmp(colname[i], "app_submode_mainid") == 0 ) {
+ if (coltxt[i])
+ info->uiapp_info->submode_mainid = strdup(coltxt[i]);
+ else
+ info->uiapp_info->submode_mainid = NULL;
} else
continue;
}
info->uiapp_info->hwacceleration = strdup(coltxt[i]);
else
info->uiapp_info->hwacceleration = NULL;
+ } else if (strcmp(colname[i], "app_screenreader") == 0 ) {
+ if (coltxt[i])
+ info->uiapp_info->screenreader = strdup(coltxt[i]);
+ else
+ info->uiapp_info->screenreader = NULL;
} else if (strcmp(colname[i], "app_enabled") == 0 ) {
if (coltxt[i])
info->uiapp_info->enabled= strdup(coltxt[i]);
info->uiapp_info->permission_type = strdup(coltxt[i]);
else
info->uiapp_info->permission_type = NULL;
+ } else if (strcmp(colname[i], "component_type") == 0 ) {
+ if (coltxt[i])
+ info->uiapp_info->component_type = strdup(coltxt[i]);
+ else
+ info->uiapp_info->component_type = NULL;
+ } else if (strcmp(colname[i], "app_preload") == 0 ) {
+ if (coltxt[i])
+ info->uiapp_info->preload = strdup(coltxt[i]);
+ else
+ info->uiapp_info->preload = NULL;
+ } else if (strcmp(colname[i], "app_submode") == 0 ) {
+ if (coltxt[i])
+ info->uiapp_info->submode = strdup(coltxt[i]);
+ else
+ info->uiapp_info->submode = NULL;
+ } else if (strcmp(colname[i], "app_submode_mainid") == 0 ) {
+ if (coltxt[i])
+ info->uiapp_info->submode_mainid = strdup(coltxt[i]);
+ else
+ info->uiapp_info->submode_mainid = NULL;
} else
continue;
}
check_result = __check_app_locale_from_app_localized_info_by_fallback(db, appid, locale);
if(check_result == 1) {
locale_new = __get_app_locale_from_app_localized_info_by_fallback(db, appid, locale);
- _LOGD("%s found (%s) language-locale in DB by fallback!\n", appid, locale_new);
free(locale);
if (locale_new == NULL)
locale_new = strdup(DEFAULT_LOCALE);
/* default locale */
free(locale);
- _LOGD("%s DEFAULT_LOCALE)\n", appid);
return strdup(DEFAULT_LOCALE);
}
retvm_if(handle == NULL, PMINFO_R_EINVAL, "pkginfo handle is NULL\n");
retvm_if(storage == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL\n");
- char *pkgid = NULL;
- pkgmgrinfo_pkginfo_get_pkgid(handle, &pkgid);
- if (pkgid == NULL){
- _LOGE("invalid func parameters\n");
- return PMINFO_R_ERROR;
- }
-
- FILE *fp = NULL;
- char app_mmc_path[FILENAME_MAX] = { 0, };
- char app_dir_path[FILENAME_MAX] = { 0, };
- char app_mmc_internal_path[FILENAME_MAX] = { 0, };
- snprintf(app_dir_path, FILENAME_MAX,
- "%s%s", PKG_INSTALLATION_PATH, pkgid);
- snprintf(app_mmc_path, FILENAME_MAX,
- "%s%s", PKG_SD_PATH, pkgid);
- snprintf(app_mmc_internal_path, FILENAME_MAX,
- "%s%s/.mmc", PKG_INSTALLATION_PATH, pkgid);
+ pkgmgr_pkginfo_x *info = (pkgmgr_pkginfo_x *)handle;
- /*check whether application is in external memory or not */
- fp = fopen(app_mmc_path, "r");
- if (fp == NULL) {
- _LOGE(" app path in external memory not accesible\n");
- } else {
- fclose(fp);
- fp = NULL;
- *storage = PMINFO_EXTERNAL_STORAGE;
- return PMINFO_R_OK;
- }
+ if (strcmp(info->manifest_info->installed_storage,"installed_internal") == 0)
+ *storage = PMINFO_INTERNAL_STORAGE;
+ else if (strcmp(info->manifest_info->installed_storage,"installed_external") == 0)
+ *storage = PMINFO_EXTERNAL_STORAGE;
+ else
+ return PMINFO_R_ERROR;
- /*check whether application is in internal or not */
- fp = fopen(app_dir_path, "r");
- if (fp == NULL) {
- _LOGE(" app path in internal memory not accesible\n");
- *storage = -1;
- return PMINFO_R_ERROR;
- } else {
- fclose(fp);
- /*check whether the application is installed in SD card
- but SD card is not present*/
- fp = fopen(app_mmc_internal_path, "r");
- if (fp == NULL) {
- *storage = PMINFO_INTERNAL_STORAGE;
- return PMINFO_R_OK;
- } else {
- fclose(fp);
- *storage = PMINFO_EXTERNAL_STORAGE;
- return PMINFO_R_OK;
- }
- }
+ return PMINFO_R_OK;
}
API int pkgmgrinfo_pkginfo_get_installed_time(pkgmgrinfo_pkginfo_h handle, int *installed_time)
return PMINFO_R_OK;
}
+API int pkgmgrinfo_pkginfo_get_csc_path(pkgmgrinfo_pkginfo_h handle, char **path)
+{
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "pkginfo handle is NULL\n");
+ retvm_if(path == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL\n");
+
+ pkgmgr_pkginfo_x *info = (pkgmgr_pkginfo_x *)handle;
+ if (info->manifest_info->csc_path)
+ *path = (char *)info->manifest_info->csc_path;
+ else
+ *path = (char *)info->manifest_info->csc_path;
+
+ return PMINFO_R_OK;
+}
API int pkgmgrinfo_pkginfo_compare_pkg_cert_info(const char *lhs_package_id, const char *rhs_package_id, pkgmgrinfo_cert_compare_result_type_e *compare_result)
{
{
retvm_if(handle == NULL, PMINFO_R_EINVAL, "pkginfo handle is NULL\n");
retvm_if(accessible == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL\n");
+
+#if 0 //smack issue occured, check later
char *pkgid = NULL;
pkgmgrinfo_pkginfo_get_pkgid(handle, &pkgid);
if (pkgid == NULL){
}
_LOGD("pkgmgr_get_pkg_external_validation() end\n");
+#endif
+
+ *accessible = 1;
return PMINFO_R_OK;
}
return PMINFO_R_OK;
}
+API int pkgmgrinfo_pkginfo_is_system(pkgmgrinfo_pkginfo_h handle, bool *system)
+{
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "pkginfo handle is NULL\n");
+ retvm_if(system == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL\n");
+
+ char *preload = NULL;
+ char *removable = NULL;
+ pkgmgr_pkginfo_x *info = (pkgmgr_pkginfo_x *)handle;
+ preload = (char *)info->manifest_info->preload;
+ removable = (char *)info->manifest_info->removable;
+
+ if ((strcasecmp(preload, "true") == 0) && (strcasecmp(removable, "false") == 0))
+ *system = 1;
+ else
+ *system = 0;
+
+ return PMINFO_R_OK;
+}
+
API int pkgmgrinfo_pkginfo_is_readonly(pkgmgrinfo_pkginfo_h handle, bool *readonly)
{
retvm_if(handle == NULL, PMINFO_R_EINVAL, "pkginfo handle is NULL\n");
pkgmgr_pkginfo_x *info = (pkgmgr_pkginfo_x *)handle;
ptr = info->manifest_info->privileges->privilege;
for (; ptr; ptr = ptr->next) {
- ret = privilege_func(ptr->text, user_data);
- if (ret < 0)
- break;
+ if (ptr->text){
+ ret = privilege_func(ptr->text, user_data);
+ if (ret < 0)
+ break;
+ }
}
return PMINFO_R_OK;
}
return PMINFO_R_OK;
}
+API int pkgmgrinfo_appinfo_get_subapp(pkgmgrinfo_appcontrol_h handle,
+ int *subapp_count, char ***subapp)
+{
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");
+ retvm_if(subapp == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL");
+ retvm_if(subapp_count == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL");
+ pkgmgrinfo_appcontrol_x *data = (pkgmgrinfo_appcontrol_x *)handle;
+ *subapp_count = data->subapp_count;
+ *subapp = data->subapp;
+ return PMINFO_R_OK;
+}
+
API int pkgmgrinfo_appinfo_get_setting_icon(pkgmgrinfo_appinfo_h handle, char **icon)
{
retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL\n");
return PMINFO_R_OK;
}
+API int pkgmgrinfo_appinfo_get_component_type(pkgmgrinfo_appinfo_h handle, char **component_type)
+{
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");
+ retvm_if(component_type == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL");
+ pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
+
+ *component_type = (char *)info->uiapp_info->component_type;
+
+ return PMINFO_R_OK;
+}
+
+API int pkgmgrinfo_appinfo_get_hwacceleration(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_hwacceleration *hwacceleration)
+{
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");
+ retvm_if(hwacceleration == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL");
+ char *val = NULL;
+ pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
+ val = (char *)info->uiapp_info->hwacceleration;
+ if (val) {
+ if (strcasecmp(val, "not-use-GL") == 0)
+ *hwacceleration = PMINFO_HWACCELERATION_NOT_USE_GL;
+ else if (strcasecmp(val, "use-GL") == 0)
+ *hwacceleration = PMINFO_HWACCELERATION_USE_GL;
+ else
+ *hwacceleration = PMINFO_HWACCELERATION_USE_SYSTEM_SETTING;
+ }
+ return PMINFO_R_OK;
+}
+
+API int pkgmgrinfo_appinfo_get_screenreader(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_screenreader *screenreader)
+{
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");
+ retvm_if(screenreader == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL");
+ char *val = NULL;
+ pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
+ val = (char *)info->uiapp_info->screenreader;
+ if (val) {
+ if (strcasecmp(val, "screenreader-off") == 0)
+ *screenreader = PMINFO_SCREENREADER_OFF;
+ else if (strcasecmp(val, "screenreader-on") == 0)
+ *screenreader = PMINFO_SCREENREADER_ON;
+ else
+ *screenreader = PMINFO_SCREENREADER_USE_SYSTEM_SETTING;
+ }
+ return PMINFO_R_OK;
+}
+
+API int pkgmgrinfo_appinfo_get_effectimage(pkgmgrinfo_appinfo_h handle, char **portrait_img, char **landscape_img)
+{
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");
+ retvm_if(portrait_img == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL");
+ retvm_if(landscape_img == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL");
+ pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
+
+ if (info->app_component == PMINFO_UI_APP){
+ *portrait_img = (char *)info->uiapp_info->portraitimg;
+ *landscape_img = (char *)info->uiapp_info->landscapeimg;
+ }
+
+ return PMINFO_R_OK;
+}
+
+API int pkgmgrinfo_appinfo_get_submode_mainid(pkgmgrinfo_appinfo_h handle, char **submode_mainid)
+{
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");
+ retvm_if(submode_mainid == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL");
+ pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
+
+ *submode_mainid = (char *)info->uiapp_info->submode_mainid;
+
+ return PMINFO_R_OK;
+}
+
API int pkgmgrinfo_appinfo_foreach_permission(pkgmgrinfo_appinfo_h handle,
pkgmgrinfo_app_permission_list_cb permission_func, void *user_data)
{
else
return PMINFO_R_EINVAL;
for (; ptr; ptr = ptr->next) {
- ret = metadata_func(ptr->key, ptr->value, user_data);
- if (ret < 0)
- break;
+ if (ptr->key) {
+ ret = metadata_func(ptr->key, ptr->value, user_data);
+ if (ret < 0)
+ break;
+ }
}
return PMINFO_R_OK;
}
int oc = 0;
int mc = 0;
int uc = 0;
+ int sc = 0;
char *pkgid = NULL;
char *manifest = NULL;
char **operation = NULL;
char **uri = NULL;
char **mime = NULL;
+ char **subapp = NULL;
appcontrol_x *appcontrol = NULL;
manifest_x *mfx = NULL;
operation_x *op = NULL;
uri_x *ui = NULL;
mime_x *mi = NULL;
+ subapp_x *sa = NULL;
pkgmgrinfo_app_component component;
pkgmgrinfo_appcontrol_x *ptr = NULL;
ret = pkgmgrinfo_appinfo_get_pkgid(handle, &pkgid);
switch (component) {
case PMINFO_UI_APP:
if (mfx->uiapplication) {
- if (mfx->uiapplication->appcontrol) {
- appcontrol = mfx->uiapplication->appcontrol;
+ if (mfx->uiapplication->appsvc) {
+ appcontrol = mfx->uiapplication->appsvc;
}
}
break;
case PMINFO_SVC_APP:
if (mfx->serviceapplication) {
- if (mfx->serviceapplication->appcontrol) {
- appcontrol = mfx->serviceapplication->appcontrol;
+ if (mfx->serviceapplication->appsvc) {
+ appcontrol = mfx->serviceapplication->appsvc;
}
}
break;
mc = mc + 1;
mi = appcontrol->mime;
+ sa = appcontrol->subapp;
+ for (; sa; sa = sa->next)
+ sc = sc + 1;
+ sa = appcontrol->subapp;
+
operation = (char **)calloc(oc, sizeof(char *));
for (i = 0; i < oc; i++) {
operation[i] = strndup(op->name, PKG_STRING_LEN_MAX - 1);
mime[i] = strndup(mi->name, PKG_STRING_LEN_MAX - 1);
mi = mi->next;
}
+
+ subapp = (char **)calloc(sc, sizeof(char *));
+ for (i = 0; i < sc; i++) {
+ subapp[i] = strndup(sa->name, PKG_STRING_LEN_MAX - 1);
+ sa = sa->next;
+ }
+
/*populate appcontrol handle*/
ptr->operation_count = oc;
ptr->uri_count = uc;
ptr->mime_count = mc;
+ ptr->subapp_count = sc;
ptr->operation = operation;
ptr->uri = uri;
ptr->mime = mime;
+ ptr->subapp = subapp;
+
ret = appcontrol_func((void *)ptr, user_data);
for (i = 0; i < oc; i++) {
if (operation[i]) {
free(mime);
mime = NULL;
}
+ for (i = 0; i < sc; i++) {
+ if (subapp[i]) {
+ free(subapp[i]);
+ subapp[i] = NULL;
+ }
+ }
+ if (subapp) {
+ free(subapp);
+ subapp = NULL;
+ }
if (ret < 0)
break;
uc = 0;
mc = 0;
oc = 0;
+ sc = 0;
}
pkgmgr_parser_free_manifest_xml(mfx);
if (ptr) {
return PMINFO_R_OK;
}
-
-API int pkgmgrinfo_appinfo_get_effectimage(pkgmgrinfo_appinfo_h handle, char **portrait_img, char **landscape_img)
-{
- retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");
- retvm_if(portrait_img == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL");
- retvm_if(landscape_img == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL");
- pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
-
- if (info->app_component == PMINFO_UI_APP){
- *portrait_img = (char *)info->uiapp_info->portraitimg;
- *landscape_img = (char *)info->uiapp_info->landscapeimg;
- }
-
- return PMINFO_R_OK;
-}
-
API int pkgmgrinfo_appinfo_is_taskmanage(pkgmgrinfo_appinfo_h handle, bool *taskmanage)
{
retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");
}
-API int pkgmgrinfo_appinfo_get_hwacceleration(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_hwacceleration *hwacceleration)
-{
- retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");
- retvm_if(hwacceleration == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL");
- char *val = NULL;
- pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
- val = (char *)info->uiapp_info->hwacceleration;
- if (val) {
- if (strcasecmp(val, "not-use-GL") == 0)
- *hwacceleration = PMINFO_HWACCELERATION_NOT_USE_GL;
- else if (strcasecmp(val, "use-GL") == 0)
- *hwacceleration = PMINFO_HWACCELERATION_USE_GL;
- else
- *hwacceleration = PMINFO_HWACCELERATION_USE_SYSTEM_SETTING;
- }
- return PMINFO_R_OK;
-}
-
API int pkgmgrinfo_appinfo_is_onboot(pkgmgrinfo_appinfo_h handle, bool *onboot)
{
retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");
return PMINFO_R_OK;
}
+API int pkgmgrinfo_appinfo_is_preload(pkgmgrinfo_appinfo_h handle, bool *preload)
+{
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL\n");
+ retvm_if(preload == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL\n");
+ char *val = NULL;
+ pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
+ val = (char *)info->uiapp_info->preload;
+ if (val) {
+ if (strcasecmp(val, "true") == 0)
+ *preload = 1;
+ else if (strcasecmp(val, "false") == 0)
+ *preload = 0;
+ else
+ *preload = 0;
+ }
+ return PMINFO_R_OK;
+}
+
+API int pkgmgrinfo_appinfo_is_submode(pkgmgrinfo_appinfo_h handle, bool *submode)
+{
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL\n");
+ retvm_if(submode == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL\n");
+ char *val = NULL;
+ pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
+ val = (char *)info->uiapp_info->submode;
+ if (val) {
+ if (strcasecmp(val, "true") == 0)
+ *submode = 1;
+ else if (strcasecmp(val, "false") == 0)
+ *submode = 0;
+ else
+ *submode = 0;
+ }
+ return PMINFO_R_OK;
+}
+
API int pkgmgrinfo_appinfo_destroy_appinfo(pkgmgrinfo_appinfo_h handle)
{
retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");