From dc0c81c8e19a408fd7eb67286b2daaa7aa9b27d7 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 1 Feb 2017 14:15:47 +0900 Subject: [PATCH] Fix bug about launching the watch app Setting the caller uid is needed for using the aul_forward_app() API. Change-Id: I0835f6e26d8e52c3163e3106084b2b1af05c1ba1 Signed-off-by: Hwankyu Jhun --- widget_viewer_sdk/src/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/widget_viewer_sdk/src/main.c b/widget_viewer_sdk/src/main.c index 2602029..d46cd85 100644 --- a/widget_viewer_sdk/src/main.c +++ b/widget_viewer_sdk/src/main.c @@ -689,6 +689,15 @@ static void __set_bundle_for_watchapp(bundle *app_control_b, bundle *b) bundle_add_str(b, AUL_K_CALLER_PID, buf); } + bundle_get_str(app_control_b, AUL_K_CALLER_UID, &value); + if (value) { + bundle_add_str(b, AUL_K_CALLER_UID, value); + value = NULL; + } else { + snprintf(buf, sizeof(buf), "%d", getuid()); + bundle_add_str(b, AUL_K_CALLER_UID, buf); + } + bundle_get_str(app_control_b, AUL_K_SDK, &sdk_util); if (sdk_util != NULL) { bundle_add_str(b, AUL_K_SDK, sdk_util); -- 2.7.4