From 922df2168e947d76c87e391d5a77dc9eb7b06aac Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 20 Jun 2018 17:55:59 +0900 Subject: [PATCH] Add white operation feature If the value of app-control operation is special, the callee application can be leader application of the app group. Change-Id: Icd87e3c9f0a81f781d7aa85d63886e159ffb9734 Signed-off-by: Hwankyu Jhun --- src/service.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/service.c b/src/service.c index 316d758..6f67566 100755 --- a/src/service.c +++ b/src/service.c @@ -103,6 +103,27 @@ static bool __is_special_app(const char *appid) return false; } +static bool __is_special_operation(bundle *b) +{ + const char *operation; + const char *white_operations[] = { + "http://tizen.org/appcontrol/operation/guide_privacy_setting", + NULL + }; + int i; + + operation = aul_svc_get_operation(b); + if (!operation) + return false; + + for (i = 0; white_operations[i]; ++i) { + if (!strcmp(operation, white_operations[i])) + return true; + } + + return false; +} + static aul_svc_cb_info_t *__create_rescb(int request_code, aul_svc_res_fn cbfunc, void *data) { @@ -209,7 +230,7 @@ static int __run_svc_with_pkgname(char *pkgname, bundle *b, int request_code, if (bundle_get_val(b, AUL_K_FORCE_LAUNCH_APP_SELECTOR)) pkgname = APP_SELECTOR; - if (__is_special_app(pkgname)) { + if (__is_special_app(pkgname) || __is_special_operation(b)) { bundle_del(b, AUL_SVC_K_CAN_BE_LEADER); bundle_add_str(b, AUL_SVC_K_CAN_BE_LEADER, "true"); bundle_del(b, AUL_SVC_K_REROUTE); -- 2.7.4