add app2ext mount handle when app which is located at sd card is mounted
authorjunsuk77.oh <junsuk77.oh@samsung.com>
Thu, 22 Nov 2012 00:20:22 +0000 (09:20 +0900)
committerjunsuk77.oh <junsuk77.oh@samsung.com>
Thu, 22 Nov 2012 00:20:22 +0000 (09:20 +0900)
Change-Id: Ia499908f55aaf424f0f5d03ae677d52d15e82ce0

CMakeLists.txt
am_daemon/amd_launch.c
packaging/aul.spec

index adc5e0f..635fd81 100755 (executable)
@@ -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)
 
index e6c1c09..5ff7824 100755 (executable)
@@ -27,6 +27,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <app2ext_interface.h>
 
 #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) {
index 95e8613..093e50a 100644 (file)
@@ -30,6 +30,7 @@ BuildRequires:  pkgconfig(utilX)
 BuildRequires:  pkgconfig(vconf)
 BuildRequires:  pkgconfig(pkgmgr-info)
 BuildRequires:  pkgconfig(libsmack)
+BuildRequires: pkgconfig(app2sd)
 
 
 %description