From 8c11334ab0e3b0d4c67d60bcc4f03a27ecde864c Mon Sep 17 00:00:00 2001 From: Hawnkyu Jhun Date: Sat, 21 Jan 2017 12:02:47 +0900 Subject: [PATCH] Support app group instance launch The caller app can get the instance id of the callee app in the reply callback. Change-Id: I0950f63d30e560e5f1fe53bf80f9dde98efc63cd Signed-off-by: Hawnkyu Jhun --- app_control/app_control.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app_control/app_control.c b/app_control/app_control.c index 5a3f983..b63d7fc 100755 --- a/app_control/app_control.c +++ b/app_control/app_control.c @@ -28,6 +28,7 @@ #include #include +#include #ifdef LOG_TAG #undef LOG_TAG @@ -655,7 +656,8 @@ static void __handle_launch_result(int launched_pid, void *data) app_control_reply_cb reply_cb; void *user_data; char callee[255] = {0, }; - int ret = 0; + char instance_id[256] = {0,}; + int ret; if (data == NULL) return; @@ -674,6 +676,13 @@ static void __handle_launch_result(int launched_pid, void *data) app_control_set_app_id(reply, callee); LOGI("app control async result callback callee pid:%d", launched_pid); + ret = aul_app_get_instance_id_bypid(launched_pid, instance_id, + sizeof(instance_id)); + if (ret == AUL_R_OK) { + app_control_set_instance_id(reply, instance_id); + LOGI("instance id(%s)", instance_id); + } + result = APP_CONTROL_RESULT_APP_STARTED; request = request_context->app_control; user_data = request_context->user_data; -- 2.7.4