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->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->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->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->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;
}
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) {
- 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) {
- *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)
{
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");
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;
}
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;
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_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");