summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYunjin Lee <yunjin-.lee@samsung.com>2017-08-09 12:13:16 +0900
committerYunjin Lee <yunjin-.lee@samsung.com>2017-08-09 04:44:10 +0000
commit63257f409c67b4ce07eea0f35c88c9bf5a8c0933 (patch)
treec8e6cb9439d5fb8895de5282c320609ec062fd5d
parentfbe89e1d01d5bf9b797fda3f404b0032a142b09e (diff)
downloadprivacy-setting-63257f409c67b4ce07eea0f35c88c9bf5a8c0933.tar.gz
privacy-setting-63257f409c67b4ce07eea0f35c88c9bf5a8c0933.tar.bz2
privacy-setting-63257f409c67b4ce07eea0f35c88c9bf5a8c0933.zip
- 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.c9
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 {