From 8c9057ecd207b3e406ddd87eeabbbe9148799193 Mon Sep 17 00:00:00 2001 From: "junsuk77.oh" Date: Thu, 22 Nov 2012 09:20:22 +0900 Subject: [PATCH] add app2ext mount handle when app which is located at sd card is mounted Change-Id: Ia499908f55aaf424f0f5d03ae677d52d15e82ce0 --- CMakeLists.txt | 2 +- am_daemon/amd_launch.c | 21 +++++++++++++++++++++ packaging/aul.spec | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index adc5e0f..635fd81 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ MESSAGE("Build type: ${CMAKE_BUILD_TYPE}") # Set required packages INCLUDE(FindPkgConfig) -pkg_check_modules(pkgs REQUIRED dlog ecore x11 libprivilege-control app-checker rua glib-2.0 ecore-x ecore-input evas vconf pkgmgr-info) +pkg_check_modules(pkgs REQUIRED dlog ecore x11 libprivilege-control app-checker rua glib-2.0 ecore-x ecore-input evas vconf pkgmgr-info app2sd) pkg_check_modules(libpkgs REQUIRED dlog bundle dbus-glib-1 ail xdgmime app-checker libsmack) PKG_CHECK_MODULES(PKGS REQUIRED glib-2.0 gio-2.0 dlog bundle) diff --git a/am_daemon/amd_launch.c b/am_daemon/amd_launch.c index e6c1c09..5ff7824 100755 --- a/am_daemon/amd_launch.c +++ b/am_daemon/amd_launch.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "amd_config.h" #include "amd_launch.h" @@ -472,6 +473,9 @@ int _start_app(char* appid, bundle* kb, int cmd, int caller_pid, int fd) int pid = -1; char tmp_pid[MAX_PID_STR_BUFSZ]; + 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; @@ -519,6 +523,23 @@ 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) { diff --git a/packaging/aul.spec b/packaging/aul.spec index 95e8613..093e50a 100644 --- a/packaging/aul.spec +++ b/packaging/aul.spec @@ -30,6 +30,7 @@ BuildRequires: pkgconfig(utilX) BuildRequires: pkgconfig(vconf) BuildRequires: pkgconfig(pkgmgr-info) BuildRequires: pkgconfig(libsmack) +BuildRequires: pkgconfig(app2sd) %description -- 2.7.4