aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Gaffie <francois.gaffie@intel.com>2015-02-20 08:33:06 +0100
committerEric Laurent <elaurent@google.com>2015-04-24 13:39:12 -0700
commit4e5e78b2c3669d308003713e758d6b3a59d50b0c (patch)
tree105cad078ae0c22c71218dd54236fe42bff29775
parent0187f92ccae8a69dbe1f1e217a65f0225d210865 (diff)
downloadexternal_parameter-framework-4e5e78b2c3669d308003713e758d6b3a59d50b0c.zip
external_parameter-framework-4e5e78b2c3669d308003713e758d6b3a59d50b0c.tar.gz
external_parameter-framework-4e5e78b2c3669d308003713e758d6b3a59d50b0c.tar.bz2
Fix "|" display artifact on inclusive criterion type
When translating a numerical value to literal for an inclusive criterion type, if the numerical value is not found into the map of pairs, it appends anyway the "|". This patch removes this artifacts display if the numerical value is not part of the acceptable values of this criterion type. Change-Id: I2ff4ee1ae6e6e3ac87c94c596bae3ae534f173c4 Signed-off-by: Francois Gaffie <francois.gaffie@intel.com>
-rw-r--r--parameter/SelectionCriterionType.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/parameter/SelectionCriterionType.cpp b/parameter/SelectionCriterionType.cpp
index 2f17379..bf03735 100644
--- a/parameter/SelectionCriterionType.cpp
+++ b/parameter/SelectionCriterionType.cpp
@@ -179,7 +179,10 @@ std::string CSelectionCriterionType::getFormattedState(int iValue) const
// Simple translation
std::string strSingleValue;
- getLiteralValue(iSingleBitValue, strSingleValue);
+ if (!getLiteralValue(iSingleBitValue, strSingleValue)) {
+ // Numeric value not part supported values for this criterion type.
+ continue;
+ }
if (bFirst) {