Add caching of App/Pkg data & use faster way to retrieve this data
[platform/core/security/askuser.git] / src / client / impl / ApiInterfaceImpl.cpp
index c653312..16e6651 100644 (file)
@@ -99,9 +99,9 @@ int ApiInterfaceImpl::process(int fd, int events)
 
 askuser_check_result ApiInterfaceImpl::checkPrivilege(const std::string &privilege)
 {
-    std::string appId = getOwnAppId();
+    std::string appId = getOwnAppId(m_pkgInfo);
     PrivilegePolicy privPolicy(appId, privilege);
-    auto policyLevel = privPolicy.calculatePolicy();
+    auto policyLevel = privPolicy.calculatePolicy(m_appInfo);
 
     if (policyLevel == "Allow") {
         return ASKUSER_CHECK_RESULT_ALLOW;