Handle AUL_TERMINATE_BGAPP request 90/181590/1
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 15 Jun 2018 02:37:09 +0000 (11:37 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Fri, 15 Jun 2018 02:37:09 +0000 (11:37 +0900)
Change-Id: Ieca6828db5277f04dfb6d3ed0f3c7a12f4787c0f
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/service_app_main.c

index baaa1a9..1c3f471 100644 (file)
@@ -232,6 +232,18 @@ static int __service_app_control(bundle *b, void *data)
        return 0;
 }
 
+static int __service_app_receive(aul_type type, bundle *b, void *data)
+{
+       appcore_base_on_receive(type, b);
+
+       if (type == AUL_TERMINATE_BGAPP) {
+               appcore_base_exit();
+               return 0;
+       }
+
+       return 0;
+}
+
 static void __loop_init(int argc, char **argv, void *data)
 {
        ecore_init();
@@ -306,6 +318,7 @@ EXPORT_API int service_app_main_ext(int argc, char **argv, service_app_lifecycle
        ops.create = __service_app_create;
        ops.terminate = __service_app_terminate;
        ops.control = __service_app_control;
+       ops.receive = __service_app_receive;
        ops.run = method->run;
        ops.exit = method->exit;
        ops.init = method->init;