diff options
author | Yunjin Lee <yunjin-.lee@samsung.com> | 2017-08-09 12:13:16 +0900 |
---|---|---|
committer | Yunjin Lee <yunjin-.lee@samsung.com> | 2017-08-09 04:44:10 +0000 |
commit | 63257f409c67b4ce07eea0f35c88c9bf5a8c0933 (patch) | |
tree | c8e6cb9439d5fb8895de5282c320609ec062fd5d | |
parent | fbe89e1d01d5bf9b797fda3f404b0032a142b09e (diff) | |
download | privacy-setting-63257f409c67b4ce07eea0f35c88c9bf5a8c0933.tar.gz privacy-setting-63257f409c67b4ce07eea0f35c88c9bf5a8c0933.tar.bz2 privacy-setting-63257f409c67b4ce07eea0f35c88c9bf5a8c0933.zip |
Change policy level according to the application's api-version when revoking privacysubmit/tizen_4.0/20170828.100008submit/tizen/20170811.073149accepted/tizen/unified/20170816.053849accepted/tizen/4.0/unified/20170828.222022
- Change policy level from 'Ask user' to 'Deny'
when application's api-version is lower than 4.0.
Those applications can't use privacy request popup API(available from platform 4.0)
hence 'Ask user' is meaningless for them.
Change-Id: I8a49c93e082aec3fa131fbe0960d543e5b5d17c3
Signed-off-by: Yunjin Lee <yunjin-.lee@samsung.com>
-rw-r--r-- | ui/src/privacy_package_list_view.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ui/src/privacy_package_list_view.c b/ui/src/privacy_package_list_view.c index 086a2dd..3f72742 100644 --- a/ui/src/privacy_package_list_view.c +++ b/ui/src/privacy_package_list_view.c @@ -23,6 +23,7 @@ #include <efl_extension.h> #include <policy-manager.h> #include <privilege_info.h> +#include <privilege_package_info.h> #include <glib.h> #include <pkgmgr-info.h> #include <tzplatform_config.h> @@ -266,7 +267,13 @@ static void privacy_package_check_changed_cb(void *data, Evas_Object *obj, void if (!strcmp(pd->pkgid, pkgid)) { char* level; if (pd->status) { - level = "Ask user"; + bool privacy_requestable = false; + ret = privilege_package_info_is_privacy_requestable(getuid(), pkgid, &privacy_requestable); + log_if(ret != PRVMGR_ERR_NONE, 1, "privilege_package_info_is_privacy_requestable failed. ret = %d", ret); + if (privacy_requestable) + level = "Ask user"; + else + level = "Deny"; pd->status = false; __terminate_app(pkgid); } else { |