From 9707a58e3eb85fd413c294e0f737c18f32cee679 Mon Sep 17 00:00:00 2001 From: Jihoon Chung Date: Fri, 10 May 2013 10:19:21 +0900 Subject: [PATCH] Support testmode privilege [Issue#] N/A [Problem] N/A [Cause] N/A [Solution] Support testmode privilege For disable privacy checks pop-up, TCS should define test mode privilege in the config.xml. (http://tizen.org/privilege/testautomation) This commit convert privilege to device-capability to check ACE [SCMRequest] N/A Change-Id: I5d4f14e0aed6c5d065685ec1582c1ce8bf7ea120 --- src/misc/feature_logic.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/misc/feature_logic.cpp b/src/misc/feature_logic.cpp index 18b640b..6ae087e 100644 --- a/src/misc/feature_logic.cpp +++ b/src/misc/feature_logic.cpp @@ -28,6 +28,11 @@ 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); } -- 2.7.4