From: Junghoon Park Date: Wed, 16 Mar 2016 02:03:05 +0000 (+0900) Subject: Support activate-below feature when launching app X-Git-Tag: submit/tizen/20160404.120725^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ef14706fdb95bfa42d9ad0f881ad8223e73f64b;p=platform%2Fcore%2Fappfw%2Fapp-core.git Support activate-below feature when launching app - Requires https://review.tizen.org/gerrit/#/c/61893/ https://review.tizen.org/gerrit/#/c/62048/ Change-Id: Id3b2ad04202f148161dc664f0c6d418abdaeb720 Signed-off-by: Junghoon Park --- diff --git a/src/appcore-efl.c b/src/appcore-efl.c index a585e79..62f9ea8 100644 --- a/src/appcore-efl.c +++ b/src/appcore-efl.c @@ -42,6 +42,8 @@ #include #include #include +#include +#include #include #include "appcore-internal.h" @@ -80,6 +82,7 @@ struct ui_priv { void *rot_cb_data; enum appcore_rm rot_mode; bundle *pending_data; + char *below_app; }; static struct ui_priv priv; @@ -249,6 +252,7 @@ static void __do_app(enum app_event event, void *data, bundle * b) { int r = -1; struct ui_priv *ui = data; + const char *below_app; _DBG("[APP %d] Event: %d", _pid, event); _ret_if(ui == NULL || event >= AE_MAX); @@ -306,6 +310,14 @@ static void __do_app(enum app_event event, void *data, bundle * b) ui->pending_data = bundle_dup(b); LOG(LOG_DEBUG, "LAUNCH", "[%s:Application:reset:start]", ui->name); + if (ui->below_app) { + free(ui->below_app); + ui->below_app = NULL; + } + + below_app = bundle_get_val(b, AUL_SVC_K_RELOCATE_BELOW); + if (below_app) + ui->below_app = strdup(below_app); #ifdef _APPFW_FEATURE_BACKGROUND_MANAGEMENT if (ui->exit_from_suspend) { _DBG("[__SUSPEND__] reset case"); @@ -383,6 +395,12 @@ static void __do_app(enum app_event event, void *data, bundle * b) traceEnd(TTRACE_TAG_APPLICATION_MANAGER); } ui->state = AS_RUNNING; + + if (ui->below_app) { + aul_app_group_activate_below(ui->below_app); + free(ui->below_app); + ui->below_app = NULL; + } } /*TODO : rotation start*/ /* r = appcore_resume_rotation_cb(); */