namespace Jobs {
namespace WidgetInstall {
-
-FeatureLogic::FeatureLogic(WidgetHandle handle)
- : m_rejected(false)
+namespace {
+const DPL::String PRIVILEGE_TESTAUTOMATION =
+ L"http://tizen.org/privilege/testautomation";
+const DPL::String DEVICE_CAPABILITY_TESTAUTOMATION = L"testautomation";
+}
+FeatureLogic::FeatureLogic(const WrtDB::TizenAppId & tzAppid) :
+ m_rejected(false)
{
- WrtDB::WidgetDAOReadOnly widgetDao(handle);
+ WrtDB::WidgetDAOReadOnly widgetDao(tzAppid);
WidgetFeatureSet featureSet = widgetDao.getFeaturesList();
FOREACH(it, featureSet) {
LogInfo("Feature name : " << it->name);
- WrtDB::DeviceCapabilitySet dcs =
- WrtDB::GlobalDAOReadOnly::GetDeviceCapability(it->name);
- FOREACH (devCap, dcs) {
+ WrtDB::DeviceCapabilitySet dcs;
+ if (!DPL::StringCompare(it->name, PRIVILEGE_TESTAUTOMATION)) {
+ // special privilege
+ // This privilege doesn't have plugin in the target
+ // only use to special behavior
+ dcs.insert(DEVICE_CAPABILITY_TESTAUTOMATION);
+ } else {
+ // normal privilege
+ dcs = WrtDB::GlobalDAOReadOnly::GetDeviceCapability(it->name);
+ }
+ FOREACH(devCap, dcs) {
LogInfo("--- dev cap : " << *devCap);
}
Feature feature(*it, dcs);
bool FeatureLogic::next()
{
while (!isDone()) {
- if (m_currentFeature->currentCap != m_currentFeature->devCapSet.end()) {
+ if (m_currentFeature->currentCap !=
+ m_currentFeature->devCapSet.end())
+ {
m_currentFeature->currentCap++;
} else {
++m_currentFeature;
return false;
}
-
void FeatureLogic::setAceResponse(bool allowed)
{
Assert(isProcessable() && "Wrong usage");
if (!allowed) {
m_currentFeature->rejected = true;
- if (m_currentFeature->required) {
- m_rejected = true;
- }
+ m_rejected = true;
}
}
return true;
}
-
} // namespace WidgetInstall
} // namespace Jobs