Fix appcore base 42/148142/2
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 7 Sep 2017 02:19:36 +0000 (11:19 +0900)
committerHwanKyu Jhun <h.jhun@samsung.com>
Thu, 7 Sep 2017 05:35:06 +0000 (05:35 +0000)
- Removes calling base_exit function in the on_terminate function
- Adds appcore_base_exit API

Change-Id: I9c2db00a0286bb8aa30a103ff0444d220555036b
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
include/appcore_base.h
src/base/appcore_base.c

index 106b9c0..795b18a 100644 (file)
@@ -88,7 +88,7 @@ bool appcore_base_is_bg_allowed(void);
 bool appcore_base_is_suspended(void);
 void appcore_base_toggle_suspended_state(void);
 int appcore_base_set_i18n(const char *domain_name, const char *dir_name);
-
+void appcore_base_exit(void);
 
 #ifdef __cplusplus
 }
index 15e6db4..5c495f5 100644 (file)
@@ -1060,8 +1060,6 @@ EXPORT_API int appcore_base_on_control(bundle *b)
 EXPORT_API int appcore_base_on_terminate()
 {
        aul_finalize();
-       if (__context.ops.exit)
-               __context.ops.exit(__context.data);
 
        return 0;
 }
@@ -1204,6 +1202,12 @@ EXPORT_API void appcore_base_toggle_suspended_state(void)
        __context.suspended_state ^= __context.suspended_state;
 }
 
+EXPORT_API void appcore_base_exit(void)
+{
+       if (__context.ops.exit)
+               __context.ops.exit(__context.data);
+}
+
 static int __on_receive(aul_type type, bundle *b, void *data)
 {
        return appcore_base_on_receive(type, b);