From e5470cf26095c6afd53c8998b7df7c6244276e7f Mon Sep 17 00:00:00 2001 From: Jiwoong Im Date: Wed, 26 Aug 2015 15:20:40 +0900 Subject: [PATCH] terminate app in terminate requset if app is not subapp. fix bug in app_terminate app_control_send_terminate_request() in capi-appfw-application. Change-Id: I4feb745833d60ebb1d073ca79d26a3f50fa44eac Signed-off-by: Jiwoong Im --- include/launch.h | 1 + src/launch.c | 3 +-- src/launch_with_result.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/launch.h b/include/launch.h index 2210ef3..ca4954a 100644 --- a/include/launch.h +++ b/include/launch.h @@ -47,6 +47,7 @@ int aul_launch_app_with_result(const char *pkgname, bundle *kb, int app_agent_send_cmd(int uid, int cmd, bundle *kb); int app_agent_send_cmd_with_noreply(int uid, int cmd, bundle *kb); int app_subapp_terminate_request(void); +int __call_aul_handler(aul_type type, bundle *kb); gboolean __aul_glib_handler(gpointer data); diff --git a/src/launch.c b/src/launch.c index 289358d..f38020a 100644 --- a/src/launch.c +++ b/src/launch.c @@ -47,7 +47,6 @@ static void *_aul_data; -static int __call_aul_handler(aul_type type, bundle *kb); static int app_resume(); static int app_terminate(); static void __clear_internal_key(bundle *kb); @@ -64,7 +63,7 @@ int aul_is_initialized() return aul_initialized; } -static int __call_aul_handler(aul_type type, bundle *kb) +int __call_aul_handler(aul_type type, bundle *kb) { if (_aul_handler) _aul_handler(type, kb, _aul_data); diff --git a/src/launch_with_result.c b/src/launch_with_result.c index 2bb35b7..0f1de15 100644 --- a/src/launch_with_result.c +++ b/src/launch_with_result.c @@ -449,11 +449,11 @@ int app_subapp_terminate_request() { if (is_subapp) { subapp_cb(subapp_data); - - return 0; + } else { + __call_aul_handler(AUL_TERMINATE, NULL); } - return -1; + return 0; } SLPAPI int aul_set_subapp(subapp_fn cb, void *data) -- 2.7.4