[Release] wrt-installer_0.1.57
[framework/web/wrt-installer.git] / src / misc / feature_logic.cpp
index 18b640b..6ae087e 100644 (file)
 
 namespace Jobs {
 namespace WidgetInstall {
+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)
 {
@@ -35,8 +40,16 @@ FeatureLogic::FeatureLogic(const WrtDB::TizenAppId & tzAppid) :
     WidgetFeatureSet featureSet = widgetDao.getFeaturesList();
     FOREACH(it, featureSet) {
         LogInfo("Feature name : " << it->name);
-        WrtDB::DeviceCapabilitySet dcs =
-            WrtDB::GlobalDAOReadOnly::GetDeviceCapability(it->name);
+        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);
         }