diff options
author | Hwankyu Jhun <h.jhun@samsung.com> | 2018-06-20 17:55:59 +0900 |
---|---|---|
committer | Hwankyu Jhun <h.jhun@samsung.com> | 2018-06-20 18:01:24 +0900 |
commit | 922df2168e947d76c87e391d5a77dc9eb7b06aac (patch) | |
tree | 468f57b171dd0da2731821116608063bdfee7ffb | |
parent | 973824e89d21259d3f6ea697b80e693d0440ecf1 (diff) | |
download | aul-1-922df2168e947d76c87e391d5a77dc9eb7b06aac.tar.gz aul-1-922df2168e947d76c87e391d5a77dc9eb7b06aac.tar.bz2 aul-1-922df2168e947d76c87e391d5a77dc9eb7b06aac.zip |
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 <h.jhun@samsung.com>
-rwxr-xr-x | src/service.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/service.c b/src/service.c index 316d7584..6f675663 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); |