Add an exception handling about permanent deletion 85/150685/3
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 4 Aug 2017 10:53:49 +0000 (19:53 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Thu, 21 Sep 2017 08:37:14 +0000 (17:37 +0900)
Change-Id: Iea0e8dc778532174c618f07273f793cbee74d35b
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
src/base/widget_base.c

index c10cd8d..0cf602c 100644 (file)
@@ -98,6 +98,7 @@ static char *__appid;
 static char *__package_id;
 static bool __fg_signal;
 static char *__viewer_endpoint;
+static bool __is_permanent;
 static void __call_update_cb(const char *class_id, const char *id, int force,
                const char *content_raw);
 
@@ -743,7 +744,8 @@ static void __multiwindow_exit(void *data)
 EXPORT_API int widget_base_exit(void)
 {
        appcore_multiwindow_base_exit();
-       aul_notify_exit();
+       if (appcore_multiwindow_base_instance_get_cnt() != 0 && __is_permanent)
+               aul_notify_exit();
 
        return 0;
 }
@@ -1485,9 +1487,11 @@ static void __multiwindow_instance_terminate(
 
        LOGD("%s is destroyed %d", id, reason);
        if (reason == WIDGET_BASE_DESTROY_TYPE_PERMANENT) {
+               __is_permanent = true;
                event = WIDGET_INSTANCE_EVENT_DESTROY;
                aul_widget_instance_del(class_id, id);
        } else {
+               __is_permanent = false;
                __send_update_status(class_id, id,
                                WIDGET_INSTANCE_EVENT_EXTRA_UPDATED,
                                content_info);