diff options
author | junsuk77.oh <junsuk77.oh@samsung.com> | 2013-01-31 09:13:56 +0900 |
---|---|---|
committer | Gerrit Code Review <gerrit2@kim11> | 2013-01-31 09:13:56 +0900 |
commit | 79d46cb2527eb765751344339c17de9ac74b9266 (patch) | |
tree | 9837ea3f23c8efe3de32026f0ad4c374bac2ba38 | |
parent | 9b1b8c5a1a21c10cba9973f6a534eb89b1b18a9e (diff) | |
parent | d17021e793f2ef55a386b4d9cfb0883184381965 (diff) | |
download | aul-1-79d46cb2527eb765751344339c17de9ac74b9266.tar.gz aul-1-79d46cb2527eb765751344339c17de9ac74b9266.tar.bz2 aul-1-79d46cb2527eb765751344339c17de9ac74b9266.zip |
Merge "add new api to enable on external memory using pkgid"
-rwxr-xr-x | am_daemon/amd_appinfo.c | 6 | ||||
-rwxr-xr-x | am_daemon/amd_appinfo.h | 1 | ||||
-rwxr-xr-x | am_daemon/amd_launch.c | 27 |
3 files changed, 14 insertions, 20 deletions
diff --git a/am_daemon/amd_appinfo.c b/am_daemon/amd_appinfo.c index cc0ed860..29ab36fc 100755 --- a/am_daemon/amd_appinfo.c +++ b/am_daemon/amd_appinfo.c @@ -29,6 +29,7 @@ enum _appinfo_idx { _AI_RESTART, _AI_MULTI, _AI_HWACC, + _AI_PKGID, _AI_MAX, }; #define _AI_START _AI_NAME /* start index */ @@ -47,6 +48,7 @@ static struct appinfo_t _appinfos[] = { [_AI_RESTART] = { "AutoRestart", AIT_RESTART, }, [_AI_MULTI] = { "Multiple", AIT_MULTI, }, [_AI_HWACC] = { "Hwacceleration", AIT_HWACC, }, + [_AI_PKGID] = { "PkgId", AIT_PKGID, }, }; struct appinfo { @@ -83,6 +85,7 @@ static int __app_info_insert_handler (const pkgmgrinfo_appinfo_h handle, void *d char *exec; char *type; char *appid; + char *pkgid; bool multiple; bool onboot; bool restart; @@ -154,6 +157,9 @@ static int __app_info_insert_handler (const pkgmgrinfo_appinfo_h handle, void *d r = pkgmgrinfo_appinfo_get_exec(handle, &exec); c->val[_AI_EXEC] = strdup(exec); + r = pkgmgrinfo_appinfo_get_pkgid(handle, &pkgid); + c->val[_AI_PKGID] = strdup(pkgid); + r = pkgmgrinfo_appinfo_get_apptype(handle, &type); if(strncmp(type, "capp", 4) == 0 ) { c->val[_AI_TYPE] = strdup("rpm"); diff --git a/am_daemon/amd_appinfo.h b/am_daemon/amd_appinfo.h index a5840f42..6330d912 100755 --- a/am_daemon/amd_appinfo.h +++ b/am_daemon/amd_appinfo.h @@ -13,6 +13,7 @@ enum appinfo_type { AIT_RESTART, /* auto restart: boolean */ AIT_MULTI, AIT_HWACC, + AIT_PKGID, }; int appinfo_init(struct appinfomgr **cf); diff --git a/am_daemon/amd_launch.c b/am_daemon/amd_launch.c index 7f90dc6e..41116453 100755 --- a/am_daemon/amd_launch.c +++ b/am_daemon/amd_launch.c @@ -482,13 +482,11 @@ int _start_app(char* appid, bundle* kb, int cmd, int caller_pid, int fd) char *multiple = NULL; char *app_path = NULL; char *pkg_type = NULL; + char *pkg_id = NULL; int pid = -1; char tmp_pid[MAX_PID_STR_BUFSZ]; char *hwacc; - int location = -1; - app2ext_handle *app2_handle = NULL; - if(strncmp(appid, "org.tizen.sat-ui", 18) == 0) { pid = __sat_ui_launch(appid, kb, cmd, caller_pid, fd); return pid; @@ -505,6 +503,12 @@ int _start_app(char* appid, bundle* kb, int cmd, int caller_pid, int fd) componet = appinfo_get_value(ai, AIT_COMP); app_path = appinfo_get_value(ai, AIT_EXEC); pkg_type = appinfo_get_value(ai, AIT_TYPE); + pkg_id = appinfo_get_value(ai, AIT_PKGID); + + ret = app2ext_enable_external_pkg(pkg_id); + if (ret < 0) + _E("pass enable external pkg"); + if (componet && strncmp(componet, "ui", 2) == 0) { multiple = appinfo_get_value(ai, AIT_MULTI); if (!multiple || strncmp(multiple, "false", 5) == 0) { @@ -543,23 +547,6 @@ int _start_app(char* appid, bundle* kb, int cmd, int caller_pid, int fd) _E("unkown application"); } - location = app2ext_get_app_location(appid); - if (location == APP2EXT_SD_CARD) - { - app2_handle = app2ext_init(APP2EXT_SD_CARD); - if (app2_handle == NULL) { - _E("app2_handle : app2ext init failed\n"); - return -1; - } - - ret = app2_handle->interface.enable(appid); - if (ret) { - _E("app2_handle : app enable API fail Reason %d", ret); - } - - app2ext_deinit(app2_handle); - } - __real_send(fd, pid); if(pid > 0) { |