diff options
author | Kevin Rocard <kevinx.rocard@intel.com> | 2013-03-26 17:09:29 +0100 |
---|---|---|
committer | David Wagner <david.wagner@intel.com> | 2014-02-12 17:03:50 +0100 |
commit | 2fbe6e8d585e3f4d1f9134f6954615f616bb7815 (patch) | |
tree | cddd5f45cfb4bb033657b2ab691f1f80f8072789 | |
parent | b2ffa5a13606abca31de9d15e1f0fcfe195cb6bf (diff) | |
download | external_parameter-framework-2fbe6e8d585e3f4d1f9134f6954615f616bb7815.zip external_parameter-framework-2fbe6e8d585e3f4d1f9134f6954615f616bb7815.tar.gz external_parameter-framework-2fbe6e8d585e3f4d1f9134f6954615f616bb7815.tar.bz2 |
PFW: Fix the useless subsystem resync on PFW load
BZ: 97808
The PFW used to resynchronise some subsystems at start before
back/forward syncronisation. Which was useless.
Reset subsystems 'needToResync' flag during PFW start before sync to
avoid this dummy resync.
Change-Id: Id0c0bb786f10e2724222fc18f2085164e95f963f
Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com>
Reviewed-on: http://android.intel.com:8080/98452
Reviewed-by: cactus <cactus@intel.com>
Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com>
Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com>
Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
-rw-r--r-- | parameter/ParameterMgr.cpp | 3 | ||||
-rw-r--r-- | parameter/SystemClass.cpp | 15 | ||||
-rw-r--r-- | parameter/SystemClass.h | 13 |
3 files changed, 29 insertions, 2 deletions
diff --git a/parameter/ParameterMgr.cpp b/parameter/ParameterMgr.cpp index 092a496..646e7af 100644 --- a/parameter/ParameterMgr.cpp +++ b/parameter/ParameterMgr.cpp @@ -362,6 +362,9 @@ bool CParameterMgr::load(string& strError) log_table(false, lstrSelectionCriteron); } + // Subsystem can not ask for resync as they have not been synced yet + getSystemClass()->cleanSubsystemsNeedToResync(); + // At initialization, check subsystems that need resync doApplyConfigurations(true); diff --git a/parameter/SystemClass.cpp b/parameter/SystemClass.cpp index bf98cb1..ae0c25f 100644 --- a/parameter/SystemClass.cpp +++ b/parameter/SystemClass.cpp @@ -232,7 +232,6 @@ const CSubsystemLibrary* CSystemClass::getSubsystemLibrary() const return _pSubsystemLibrary; } -// Fill syncer-set with syncers from subsytems that need resync void CSystemClass::checkForSubsystemsToResync(CSyncerSet& syncerSet) { uint32_t uiNbChildren = getNbChildren(); @@ -252,6 +251,20 @@ void CSystemClass::checkForSubsystemsToResync(CSyncerSet& syncerSet) } } +void CSystemClass::cleanSubsystemsNeedToResync() +{ + uint32_t uiNbChildren = getNbChildren(); + uint32_t uiChild; + + for (uiChild = 0; uiChild < uiNbChildren; uiChild++) { + + CSubsystem* pSubsystem = static_cast<CSubsystem*>(getChild(uiChild)); + + // Consume the need for a resync + pSubsystem->needResync(true); + } +} + bool CSystemClass::init(string& strError) { return base::init(strError); diff --git a/parameter/SystemClass.h b/parameter/SystemClass.h index a522a33..5bc9006 100644 --- a/parameter/SystemClass.h +++ b/parameter/SystemClass.h @@ -41,9 +41,20 @@ public: // Subsystem factory const CSubsystemLibrary* getSubsystemLibrary() const; - // Fill syncer-set with syncers from subsytems that need resync + /** + * Look for subsystems that need to be resynchronized. + * Consume the need to be resynchronized + * and fill a syncer set with all syncers that need to be resynchronized + * + * @param[out] syncerSet The syncer set to fill + */ void checkForSubsystemsToResync(CSyncerSet& syncerSet); + /** + * Reset subsystems need to resync flag. + */ + void cleanSubsystemsNeedToResync(); + // base virtual bool init(string& strError); virtual string getKind() const; |