Check whether privilege is provided by a global application,
if it is not supplied by local application.
Change-Id: I630ae599df5f412447662ec505ddc2b8e817106b
std::string appName, pkgName;
try {
m_privilegeDb.GetAppForAppDefinedPrivilege(std::make_pair(privilege, 0), uid, appName);
+
+ // check if privilege is provided by globally installed application
+ if (appName.empty())
+ m_privilegeDb.GetAppForAppDefinedPrivilege(std::make_pair(privilege, 0), getGlobalUserId(), appName);
+
m_privilegeDb.GetAppPkgName(appName, pkgName);
if (appName.empty() || pkgName.empty()) {
LogWarning("Privilege " << privilege << " not found in database");