From 0397903f585e1338fd3e1e035605b4751b871d1f Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Tue, 14 May 2019 16:27:47 +0900 Subject: [PATCH] Handle new AUL requests 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 --- src/base/appcore_base.c | 4 +++- src/ui_base/appcore_ui_base.c | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/base/appcore_base.c b/src/base/appcore_base.c index 0550161..3795ee3 100644 --- a/src/base/appcore_base.c +++ b/src/base/appcore_base.c @@ -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; diff --git a/src/ui_base/appcore_ui_base.c b/src/ui_base/appcore_ui_base.c index eb14658..e53466b 100644 --- a/src/ui_base/appcore_ui_base.c +++ b/src/ui_base/appcore_ui_base.c @@ -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) -- 2.7.4