Handle new AUL requests 92/206092/1
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 14 May 2019 07:27:47 +0000 (16:27 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 14 May 2019 07:29:48 +0000 (16:29 +0900)
To terminate sub application, Application Manager sends the
AUL_TERMINATE_INST request. After this patch is applied, app-core
handles the request to terminate.

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

index 0550161..3795ee3 100644 (file)
@@ -1197,8 +1197,10 @@ EXPORT_API int appcore_base_on_receive(aul_type type, bundle *b)
                if (__context.ops.exit)
                        __context.ops.exit(__context.data);
                break;
+       case AUL_TERMINATE_INST:
+       case AUL_TERMINATE_BG_INST:
        case AUL_TERMINATE_BGAPP:
-               _DBG("[APP %d]     AUL event: AUL_TERMINATE_BGAPP", getpid());
+               _DBG("[APP %d]     AUL event: %d", getpid(), type);
                if (!__context.allowed_bg)
                        __remove_suspend_timer();
                break;
index eb14658..e53466b 100644 (file)
@@ -624,7 +624,8 @@ EXPORT_API int appcore_ui_base_on_receive(aul_type type, bundle *b)
                return 0;
        }
 
-       if (type == AUL_TERMINATE_BGAPP && __context.state != AS_PAUSED)
+       if ((type == AUL_TERMINATE_BGAPP || type == AUL_TERMINATE_BG_INST) &&
+                       __context.state != AS_PAUSED)
                return 0;
 
        if (type == AUL_START)
@@ -649,8 +650,10 @@ EXPORT_API int appcore_ui_base_on_receive(aul_type type, bundle *b)
                break;
        case AUL_TERMINATE:
                break;
+       case AUL_TERMINATE_BG_INST:
+       case AUL_TERMINATE_INST:
        case AUL_TERMINATE_BGAPP:
-               _DBG("[APP %d] is paused. TERMINATE", getpid());
+               _DBG("[APP %d] TERMINATE", getpid());
                __context.state = AS_DYING;
                aul_status_update(STATUS_DYING);
                if (__context.ops.base.exit)