From: Hwankyu Jhun Date: Wed, 20 Jun 2018 08:55:59 +0000 (+0900) Subject: Add white operation feature X-Git-Tag: accepted/tizen/unified/20180621.141530~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F02%2F182102%2F2;p=platform%2Fcore%2Fappfw%2Faul-1.git 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 --- 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);