service application doesn't have launch mode
Change-Id: I1740c99a92cb01700fe32f755aa8ee01c4fdac75
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL\n");
retvm_if(mode == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL\n");
pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
- if (info->uiapp_info->launch_mode)
- *mode = (char *)(info->uiapp_info->launch_mode);
- else
+
+ if (info->app_component != PMINFO_UI_APP)
+ return PMINFO_R_EINVAL;
+
+ if (info->uiapp_info->launch_mode == NULL)
return PMINFO_R_ERROR;
+ *mode = (char *)(info->uiapp_info->launch_mode);
+
return PMINFO_R_OK;
}