terminate app in terminate requset if app is not subapp. 82/46782/2
authorJiwoong Im <jiwoong.im@samsung.com>
Wed, 26 Aug 2015 06:20:40 +0000 (15:20 +0900)
committerJiwoong Im <jiwoong.im@samsung.com>
Wed, 26 Aug 2015 08:23:12 +0000 (01:23 -0700)
fix bug in app_terminate app_control_send_terminate_request() in
capi-appfw-application.

Change-Id: I4feb745833d60ebb1d073ca79d26a3f50fa44eac
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
include/launch.h
src/launch.c
src/launch_with_result.c

index 2210ef3..ca4954a 100644 (file)
@@ -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);
 
 
index 289358d..f38020a 100644 (file)
@@ -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);
index 2bb35b7..0f1de15 100644 (file)
@@ -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)