- ace_return_t ret = ace_get_policy_result(
- const_cast<const ace_resource_t>(devCapStr.c_str()),
- dao.getHandle(), //TODO: remove dao.getHandle()
- &policyResult);
- if (ACE_OK != ret) {
- ThrowMsg(Exceptions::NotAllowed, "Instalation failure. "
- "ACE check failure");
+
+ //TODO: remove dao.getHandle()
+ if (m_context.mode.installTime == InstallMode::InstallTime::PRELOAD) {
+ LogDebug("This widget is prealoaded. So ace check will be skiped");
+ policyResult = ACE_PERMIT;
+ } else {
+ ace_return_t ret = ace_get_policy_result(
+ const_cast<const ace_resource_t>(devCapStr.c_str()),
+ dao.getHandle(),
+ &policyResult);
+ if (ACE_OK != ret) {
+ ThrowMsg(Exceptions::AceCheckFailed, "Instalation failure. "
+ "ACE check failure");
+ }