From d6f7236830a37546e07dffd777a2ebe3c22674f8 Mon Sep 17 00:00:00 2001 From: Junghoon Park Date: Tue, 8 Nov 2016 09:47:22 +0900 Subject: [PATCH] Change the window stack limitedly - puts some app above the caller app Change-Id: Ib85237f28b8342b4209d5720522ae253b431f52b Signed-off-by: Junghoon Park --- include/aul.h | 17 ++++++++++++++++- include/aul_cmd.h | 1 + src/app_group.c | 22 ++++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/include/aul.h b/include/aul.h index 477b8e4..0f9c817 100644 --- a/include/aul.h +++ b/include/aul.h @@ -2382,7 +2382,7 @@ void aul_app_group_get_idle_pids(int *cnt, int **pids); * This API's purpose is to reorder window stack limitedly. * * @param[in] below_appid The appid to be reordered below the caller app - * @return Loader ID if success, negative value(<0) if fail + * @return 0 success, negative value(<0) if fail * * @remark * below_appid should be main app which have been launched before. @@ -2390,6 +2390,21 @@ void aul_app_group_get_idle_pids(int *cnt, int **pids); */ int aul_app_group_activate_below(const char *below_appid); +/** + * @par Description: + * This API puts some app above the caller app + * @par Purpose: + * This API's purpose is to reorder window stack limitedly. + * + * @param[in] above_appid The appid to be reordered above the caller app + * @return 0 if success, negative value(<0) if fail + * + * @remark + * above_appid should be main app which have been launched before. + * This API is only available in User Session. +*/ +int aul_app_group_activate_above(const char *above_appid); + /* * This API is only for Appfw internally. */ diff --git a/include/aul_cmd.h b/include/aul_cmd.h index ef5071e..1cedb97 100644 --- a/include/aul_cmd.h +++ b/include/aul_cmd.h @@ -105,6 +105,7 @@ enum app_cmd { APP_STATUS_NOTIFICATION = 76, APP_ENABLE_ALIAS_INFO = 77, APP_DISABLE_ALIAS_INFO = 78, + APP_GROUP_ACTIVATE_ABOVE = 79, APP_CMD_MAX }; diff --git a/src/app_group.c b/src/app_group.c index 8252578..e600e81 100644 --- a/src/app_group.c +++ b/src/app_group.c @@ -293,4 +293,26 @@ API int aul_app_group_activate_below(const char *below_appid) return ret; } +API int aul_app_group_activate_above(const char *above_appid) +{ + int ret; + bundle *b; + + if (above_appid == NULL) + return -1; + + b = bundle_create(); + + if (b == NULL) { + _E("out of memory"); + return -1; + } + + bundle_add_str(b, AUL_K_APPID, above_appid); + ret = app_send_cmd(AUL_UTIL_PID, APP_GROUP_ACTIVATE_ABOVE, b); + bundle_free(b); + + return ret; +} + -- 2.7.4