#define CANDIDATE_NONE 0
#define PROCESS_POOL_LAUNCHPAD_SOCK ".launchpad-process-pool-sock"
#define LOADER_PATH_DEFAULT "/usr/bin/launchpad-loader"
+#define LOADER_PATH_WRT "/usr/bin/wrt-loader"
typedef struct {
int type;
return security_manager_prepare_app(appId) == SECURITY_MANAGER_SUCCESS ? 0 : -1;
}
-static int __get_launchpad_type(const char* internal_pool, const char* hwacc)
+static int __get_launchpad_type(const char* internal_pool, const char* hwacc, const char *pkg_type)
{
int r;
int sys_hwacc = -1;
+ if (pkg_type && strncmp(pkg_type, "wgt", 3) == 0) {
+ _D("[launchpad] launchpad type: wrt");
+ return LAUNCHPAD_TYPE_WRT;
+ }
+
if (internal_pool && strncmp(internal_pool, "true", 4) == 0 && hwacc) {
if (strncmp(hwacc, "NOT_USE", 7) == 0) {
_D("[launchpad] launchpad type: S/W(%d)", LAUNCHPAD_TYPE_SW);
SECURE_LOGD("comp_type : %s\n", menu_info->comp_type);
SECURE_LOGD("internal pool : %s\n", menu_info->internal_pool);
SECURE_LOGD("hwacc : %s\n", menu_info->hwacc);
+ SECURE_LOGD("pkg_type : %s\n", menu_info->pkg_type);
if ((loader_id = __get_loader_id(kb)) <= PAD_LOADER_ID_STATIC) {
- type = __get_launchpad_type(menu_info->internal_pool, menu_info->hwacc);
+ type = __get_launchpad_type(menu_info->internal_pool, menu_info->hwacc, menu_info->pkg_type);
if (type < 0) {
_E("failed to get launchpad type");
goto end;
if (__prepare_candidate_process(LAUNCHPAD_TYPE_HW, PAD_LOADER_ID_STATIC) != 0)
return -1;
+ if (access(LOADER_PATH_WRT, F_OK | X_OK) == 0) {
+ if (__add_slot(LAUNCHPAD_TYPE_WRT, PAD_LOADER_ID_STATIC, 0, LOADER_PATH_WRT) == NULL)
+ return -1;
+ if (__prepare_candidate_process(LAUNCHPAD_TYPE_WRT, PAD_LOADER_ID_STATIC) != 0)
+ return -1;
+ }
+
return 0;
}