summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHawnkyu Jhun <h.jhun@samsung.com>2017-01-21 12:02:47 +0900
committerHwankyu Jhun <h.jhun@samsung.com>2017-01-23 13:31:33 +0900
commit8c11334ab0e3b0d4c67d60bcc4f03a27ecde864c (patch)
tree6c91553ea802918be99228ea99aecdc8ce500e63
parent9b3098d0d8be5f56f04bc401bc4335726e5d2f0b (diff)
downloadapplication-8c11334ab0e3b0d4c67d60bcc4f03a27ecde864c.tar.gz
application-8c11334ab0e3b0d4c67d60bcc4f03a27ecde864c.tar.bz2
application-8c11334ab0e3b0d4c67d60bcc4f03a27ecde864c.zip
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 <h.jhun@samsung.com>
-rwxr-xr-xapp_control/app_control.c11
1 files changed, 10 insertions, 1 deletions
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 <dlog.h>
#include <app_control.h>
+#include <app_control_internal.h>
#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;