diff options
-rwxr-xr-x | CMakeLists.txt | 4 | ||||
-rwxr-xr-x | am_daemon/amd_appinfo.c | 54 | ||||
-rwxr-xr-x | am_daemon/amd_launch.c | 5 | ||||
-rwxr-xr-x | packaging/aul.spec | 3 | ||||
-rwxr-xr-x | src/launch_with_result.c | 5 |
5 files changed, 61 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e09a8d68..a1acf649 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,10 +23,10 @@ INCLUDE(FindPkgConfig) OPTION(WITH_WAYLAND "Build with wayland" OFF) IF(WITH_WAYLAND) ADD_DEFINITIONS("-DWAYLAND") - pkg_check_modules(pkgs REQUIRED dlog ecore x11 libprivilege-control app-checker rua glib-2.0 ecore-wayland ecore-input evas vconf pkgmgr-info app2sd privacy-manager-client) + pkg_check_modules(pkgs REQUIRED dlog ecore x11 libprivilege-control app-checker rua glib-2.0 ecore-wayland ecore-input evas vconf pkgmgr-info privacy-manager-client) ELSE() ADD_DEFINITIONS("-DX11") - 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 privacy-manager-client) + pkg_check_modules(pkgs REQUIRED dlog ecore x11 libprivilege-control app-checker rua glib-2.0 ecore-x ecore-input evas vconf pkgmgr-info privacy-manager-client) ENDIF(WITH_WAYLAND) pkg_check_modules(libpkgs REQUIRED dlog bundle dbus-glib-1 ail xdgmime app-checker libsmack) diff --git a/am_daemon/amd_appinfo.c b/am_daemon/amd_appinfo.c index 94f73f5d..5349bd24 100755 --- a/am_daemon/amd_appinfo.c +++ b/am_daemon/amd_appinfo.c @@ -277,7 +277,7 @@ static void __vconf_cb(keynode_t *key, void *data) g_hash_table_remove(cf->tbl, appid); } else if (strncmp(type_string, "update", 6) == 0){ /*REMOVE EXISTING ENTRY & CREATE AGAIN*/ - if (g_hash_table_remove(cf->tbl, appid) == true){ + if (g_hash_table_remove(cf->tbl, appid)){ if (pkgmgrinfo_appinfo_get_appinfo(appid, &handle) == PMINFO_R_OK){ __app_info_insert_handler(handle, data); pkgmgrinfo_appinfo_destroy_appinfo(handle); @@ -286,6 +286,52 @@ static void __vconf_cb(keynode_t *key, void *data) } } +int app_func(pkgmgrinfo_appinfo_h handle, void *user_data) +{ + char *appid = NULL; + struct appinfomgr *cf = (struct appinfomgr *)user_data; + int r; + + pkgmgrinfo_appinfo_get_appid(handle, &appid); + r = g_hash_table_remove(cf->tbl, appid); + SECURE_LOGD("upgrading... (%s)", appid); + + return 0; +} + +static int __cb(int req_id, const char *pkg_type, + const char *pkgid, const char *key, const char *val, + const void *pmsg, void *user_data) +{ + int ret = 0; + pkgmgrinfo_pkginfo_h handle; + + SECURE_LOGD("appid(%s), key(%s), value(%s)", pkgid, key, val); + + if((strncmp(key,"start", 5) == 0) && (strncmp(val, "update", 6) == 0) ) { + ret = pkgmgrinfo_pkginfo_get_pkginfo(pkgid, &handle); + if (ret != PMINFO_R_OK) + return -1; + ret = pkgmgrinfo_appinfo_get_list(handle, PMINFO_UI_APP, app_func, user_data); + if (ret != PMINFO_R_OK) { + pkgmgrinfo_pkginfo_destroy_pkginfo(handle); + return -1; + } + pkgmgrinfo_pkginfo_destroy_pkginfo(handle); + } else if (strncmp(key,"end", 3) == 0) { + ret = pkgmgrinfo_pkginfo_get_pkginfo(pkgid, &handle); + if (ret != PMINFO_R_OK) + return -1; + ret = pkgmgrinfo_appinfo_get_list(handle, PMINFO_UI_APP, __app_info_insert_handler, user_data); + if (ret != PMINFO_R_OK) { + pkgmgrinfo_pkginfo_destroy_pkginfo(handle); + return -1; + } + pkgmgrinfo_pkginfo_destroy_pkginfo(handle); + } + return ret; +} + int appinfo_init(struct appinfomgr **cf) { struct appinfomgr *_cf; @@ -326,6 +372,12 @@ int appinfo_init(struct appinfomgr **cf) if (r < 0) _E("Unable to register vconf notification callback for VCONFKEY_MENUSCREEN_DESKTOP\n"); + int event_type = PMINFO_CLIENT_STATUS_UPGRADE; + pkgmgrinfo_client *pc = NULL; + pc = pkgmgrinfo_client_new(PMINFO_REQUEST); + pkgmgrinfo_client_set_status_type(pc, event_type); + pkgmgrinfo_client_listen_status(pc, __cb , _cf); + *cf = _cf; return 0; diff --git a/am_daemon/amd_launch.c b/am_daemon/amd_launch.c index fed2659b..aa88100f 100755 --- a/am_daemon/amd_launch.c +++ b/am_daemon/amd_launch.c @@ -27,7 +27,6 @@ #include <string.h> #include <stdlib.h> #include <stdio.h> -#include <app2ext_interface.h> #include <sys/prctl.h> #include <pkgmgr-info.h> #include <poll.h> @@ -752,9 +751,7 @@ int _start_app(char* appid, bundle* kb, int cmd, int caller_pid, uid_t caller_ui } } - if(app2ext_get_app_location(pkgid) == APP2EXT_SD_CARD) { - app2ext_enable_external_pkg(pkgid); - } + pkgmgrinfo_client_request_enable_external_pkg(pkgid); if (componet && strncmp(componet, "ui", 2) == 0) { multiple = appinfo_get_value(ai, AIT_MULTI); diff --git a/packaging/aul.spec b/packaging/aul.spec index 120ed87d..846eee13 100755 --- a/packaging/aul.spec +++ b/packaging/aul.spec @@ -2,7 +2,7 @@ Name: aul Summary: App utility library -Version: 0.0.282 +Version: 0.0.286 Release: 1 Group: System/Libraries License: Apache-2.0 @@ -40,7 +40,6 @@ BuildRequires: pkgconfig(utilX) BuildRequires: pkgconfig(vconf) BuildRequires: pkgconfig(pkgmgr-info) BuildRequires: pkgconfig(libsmack) -BuildRequires: pkgconfig(app2sd) BuildRequires: pkgconfig(privacy-manager-client) diff --git a/src/launch_with_result.c b/src/launch_with_result.c index 60fd2ec3..b8ff4fd5 100755 --- a/src/launch_with_result.c +++ b/src/launch_with_result.c @@ -440,8 +440,11 @@ int app_subapp_terminate_request() { if(is_subapp) { subapp_cb(subapp_data); + + return 0; } - return 0; + + return -1; } SLPAPI int aul_set_subapp(subapp_fn cb, void *data) |