From 22f5d187b6479babca02a10c2da4651431afc47b Mon Sep 17 00:00:00 2001 From: hyunho Date: Tue, 10 Mar 2020 17:05:07 +0900 Subject: [PATCH] Add screen-type info for trigger_focused Cynara checks screen-type Change-Id: I3c2993c37b0437d69b64d77c73cd4ea9da535278 Signed-off-by: hyunho --- src/aul_screen_connector.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/src/aul_screen_connector.c b/src/aul_screen_connector.c index 95cd32c..a0074d9 100644 --- a/src/aul_screen_connector.c +++ b/src/aul_screen_connector.c @@ -560,12 +560,29 @@ API int aul_screen_connector_update_screen_viewer_status( return ret; } -API int aul_screen_connector_trigger_focused_force() { +API int aul_screen_connector_trigger_focused_force() +{ int ret; + char buf[MAX_PID_STR_BUFSZ]; + bundle *b; - ret = aul_sock_send_raw(AUL_UTIL_PID, getuid(), - TRIGGER_APP_SCREEN_FOCUSED_FORCE, NULL, 0, AUL_SOCK_NOREPLY); + b = bundle_create(); + if (b == NULL) { + _E("out of memory"); + return -1; + } - return ret; -} + snprintf(buf, sizeof(buf), "%d", AUL_SCREEN_TYPE_UI); + ret = bundle_add(b, AUL_K_SCREEN_TYPE, buf); + if (ret != BUNDLE_ERROR_NONE) { + _E("Failed to add view mode"); + bundle_free(b); + return -1; + } + ret = aul_sock_send_bundle(AUL_UTIL_PID, getuid(), + TRIGGER_APP_SCREEN_FOCUSED_FORCE, b, AUL_SOCK_NOREPLY); + bundle_free(b); + + return ret; +} \ No newline at end of file -- 2.7.4