PFW: Fixed bug on BitParameterTypes
BZ: 44148
The save and restore operation would not work correctly when BitParameters
of a BitParameterBlock were used in more than a single Domain.
This patch aims to fixup this bug and introduces a new class: BitwiseAreaConfiguration.
Change-Id: I0aaccd57cf1cce33400f94a8879565171d283425
Orig-Change-Id: I7107f7db9f01cfff3c38cbac606a8c1e9bca8b5e
Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com>
Reviewed-on: http://android.intel.com:8080/58363
Reviewed-by: Mendi, EduardoX <eduardox.mendi@intel.com>
Tested-by: Mendi, EduardoX <eduardox.mendi@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
diff --git a/parameter/ConfigurableDomain.cpp b/parameter/ConfigurableDomain.cpp
index 4c6541f..c72b0a8 100644
--- a/parameter/ConfigurableDomain.cpp
+++ b/parameter/ConfigurableDomain.cpp
@@ -356,14 +356,7 @@
log("Adding configurable element \"%s\" into domain \"%s\"", pConfigurableElement->getPath().c_str(), getName().c_str());
// Do add
- doAddConfigurableElement(pConfigurableElement);
-
- // Ensure area validity for that configurable element (if main blackboard provided)
- if (pMainBlackboard) {
-
- // Need to validate against main blackboard
- validateAreas(pConfigurableElement, pMainBlackboard);
- }
+ doAddConfigurableElement(pConfigurableElement, pMainBlackboard);
return true;
}
@@ -931,7 +924,7 @@
}
// Configurable elements association
-void CConfigurableDomain::doAddConfigurableElement(CConfigurableElement* pConfigurableElement)
+void CConfigurableDomain::doAddConfigurableElement(CConfigurableElement* pConfigurableElement, const CParameterBlackboard *pMainBlackboard)
{
// Inform configurable element
pConfigurableElement->addAttachedConfigurableDomain(this);
@@ -959,7 +952,14 @@
pDomainConfiguration->addConfigurableElement(pConfigurableElement, pSyncerSet);
}
- // Already associated descended configurable elements need a merge of their configuration data
+ // Ensure area validity for that configurable element (if main blackboard provided)
+ if (pMainBlackboard) {
+
+ // Need to validate against main blackboard
+ validateAreas(pConfigurableElement, pMainBlackboard);
+ }
+
+ // Already associated descendend configurable elements need a merge of their configuration data
mergeAlreadyAssociatedDescendantConfigurableElements(pConfigurableElement);
// Add to list