Snap for 9550355 from 3f7edc587614ecf3f9e34c9d072444157e3e8dd5 to sdk-release

Change-Id: I20aa67874c0c1a3e9af91736a2b270db4865111c
diff --git a/Android.bp b/Android.bp
index a2e72ba..c9a87d1 100644
--- a/Android.bp
+++ b/Android.bp
@@ -388,14 +388,6 @@
     owner: "intel",
 
     srcs: [":EddParser.py-srcs"],
-    version: {
-        py2: {
-            enabled: false,
-        },
-        py3: {
-            enabled: true,
-        },
-    },
 }
 
 filegroup {
@@ -410,14 +402,6 @@
     owner: "intel",
 
     srcs: [":PfwBaseTranslator.py-srcs"],
-    version: {
-        py2: {
-            enabled: false,
-        },
-        py3: {
-            enabled: true,
-        },
-    },
 }
 
 filegroup {
@@ -436,14 +420,6 @@
         "PfwBaseTranslator.py",
         "EddParser.py",
     ],
-    version: {
-        py2: {
-            enabled: false,
-        },
-        py3: {
-            enabled: true,
-        },
-    },
 }
 
 sh_binary {
@@ -466,14 +442,6 @@
     owner: "intel",
 
     srcs: [":hostConfig.py-srcs"],
-    version: {
-        py2: {
-            enabled: false,
-        },
-        py3: {
-            enabled: true,
-        },
-    },
 }
 
 python_binary_host {
@@ -488,14 +456,6 @@
         "hostConfig.py",
         "PFWScriptGenerator.py",
     ],
-    version: {
-        py2: {
-            enabled: false,
-        },
-        py3: {
-            enabled: true,
-        },
-    },
     required: [
         "domainGeneratorConnector",
     ],
diff --git a/upstream/bindings/c/ParameterFramework.cpp b/upstream/bindings/c/ParameterFramework.cpp
index 858994b..1e09eea 100644
--- a/upstream/bindings/c/ParameterFramework.cpp
+++ b/upstream/bindings/c/ParameterFramework.cpp
@@ -197,10 +197,10 @@
         assert(type != nullptr);
         // Add criterion values
         for (size_t valueIndex = 0; criterion.values[valueIndex] != nullptr; ++valueIndex) {
-            int value;
+            uint64_t value;
             if (criterion.inclusive) {
                 // Check that (int)1 << valueIndex would not overflow (UB)
-                if (std::numeric_limits<int>::max() >> valueIndex == 0) {
+                if (std::numeric_limits<uint64_t>::max() >> valueIndex == 0) {
                     return status.failure("Too many values for criterion " +
                                           string(criterion.name));
                 }
@@ -253,7 +253,7 @@
     return it == criteria.end() ? nullptr : it->second;
 }
 
-bool pfwSetCriterion(PfwHandler *handle, const char name[], int value)
+bool pfwSetCriterion(PfwHandler *handle, const char name[], uint64_t value)
 {
     Status &status = handle->lastStatus;
     if (handle->pfw == nullptr) {
@@ -267,7 +267,7 @@
     criterion->setCriterionState(value);
     return status.success();
 }
-bool pfwGetCriterion(const PfwHandler *handle, const char name[], int *value)
+bool pfwGetCriterion(const PfwHandler *handle, const char name[], uint64_t *value)
 {
     Status &status = handle->lastStatus;
     if (handle->pfw == nullptr) {
diff --git a/upstream/bindings/c/ParameterFramework.h b/upstream/bindings/c/ParameterFramework.h
index c136845..d763f21 100644
--- a/upstream/bindings/c/ParameterFramework.h
+++ b/upstream/bindings/c/ParameterFramework.h
@@ -192,14 +192,15 @@
   * @return true on success and false on failure.
   */
 CPARAMETER_EXPORT
-bool pfwSetCriterion(PfwHandler *handle, const char name[], int value) NONNULL USERESULT;
+bool pfwSetCriterion(PfwHandler *handle, const char name[], uint64_t value) NONNULL USERESULT;
 /** Get a criterion value given its name.
   * Same usage as pfwSetCriterion except that value is an out param.
   * Get criterion will return the last value setted with pfwSetCriterion independantly of
   * pfwCommitCritenio.
   */
 CPARAMETER_EXPORT
-bool pfwGetCriterion(const PfwHandler *handle, const char name[], int *value) NONNULL USERESULT;
+bool pfwGetCriterion(const PfwHandler *handle, const char name[],
+                     uint64_t *value) NONNULL USERESULT;
 
 /** Commit criteria change and change parameters according to the configurations.
   * Criterion do not have impact on the parameters value when changed,
diff --git a/upstream/bindings/python/pfw.i b/upstream/bindings/python/pfw.i
index a1bfe62..7a4b151 100644
--- a/upstream/bindings/python/pfw.i
+++ b/upstream/bindings/python/pfw.i
@@ -206,11 +206,12 @@
 %}
 
 public:
-    virtual bool addValuePair(int iValue, const std::string& strValue, std::string& strError) = 0;
-    virtual bool getNumericalValue(const std::string& strValue, int& iValue) const = 0;
-    virtual bool getLiteralValue(int iValue, std::string& strValue) const = 0;
+    virtual bool addValuePair(uint64_t iValue, const std::string& strValue,
+                              std::string& strError) = 0;
+    virtual bool getNumericalValue(const std::string& strValue, uint64_t& iValue) const = 0;
+    virtual bool getLiteralValue(uint64_t iValue, std::string& strValue) const = 0;
     virtual bool isTypeInclusive() const = 0;
-    virtual std::string getFormattedState(int iValue) const = 0;
+    virtual std::string getFormattedState(uint64_t iValue) const = 0;
 
 protected:
     virtual ~ISelectionCriterionTypeInterface() {}
@@ -223,8 +224,8 @@
 %}
 
 public:
-    virtual void setCriterionState(int iState) = 0;
-    virtual int getCriterionState() const = 0;
+    virtual void setCriterionState(uint64_t iState) = 0;
+    virtual uint64_t getCriterionState() const = 0;
     virtual std::string getCriterionName() const = 0;
     virtual const ISelectionCriterionTypeInterface* getCriterionType() const = 0;
 
diff --git a/upstream/parameter/SelectionCriterion.cpp b/upstream/parameter/SelectionCriterion.cpp
index f99abec..97203d6 100644
--- a/upstream/parameter/SelectionCriterion.cpp
+++ b/upstream/parameter/SelectionCriterion.cpp
@@ -60,7 +60,7 @@
 
 /// From ISelectionCriterionInterface
 // State
-void CSelectionCriterion::setCriterionState(int iState)
+void CSelectionCriterion::setCriterionState(uint64_t iState)
 {
     // Check for a change
     if (_iState != iState) {
@@ -85,7 +85,7 @@
     }
 }
 
-int CSelectionCriterion::getCriterionState() const
+uint64_t CSelectionCriterion::getCriterionState() const
 {
     return _iState;
 }
@@ -103,24 +103,24 @@
 }
 
 /// Match methods
-bool CSelectionCriterion::is(int iState) const
+bool CSelectionCriterion::is(uint64_t iState) const
 {
     return _iState == iState;
 }
 
-bool CSelectionCriterion::isNot(int iState) const
+bool CSelectionCriterion::isNot(uint64_t iState) const
 {
     return _iState != iState;
 }
 
-bool CSelectionCriterion::includes(int iState) const
+bool CSelectionCriterion::includes(uint64_t iState) const
 {
     // For inclusive criterion, Includes checks if ALL the bit sets in iState are set in the
     // current _iState.
     return (_iState & iState) == iState;
 }
 
-bool CSelectionCriterion::excludes(int iState) const
+bool CSelectionCriterion::excludes(uint64_t iState) const
 {
     return (_iState & iState) == 0;
 }
diff --git a/upstream/parameter/SelectionCriterion.h b/upstream/parameter/SelectionCriterion.h
index 9c2dfe2..079ea43 100644
--- a/upstream/parameter/SelectionCriterion.h
+++ b/upstream/parameter/SelectionCriterion.h
@@ -47,8 +47,8 @@
 
     /// From ISelectionCriterionInterface
     // State
-    void setCriterionState(int iState) override;
-    int getCriterionState() const override;
+    void setCriterionState(uint64_t iState) override;
+    uint64_t getCriterionState() const override;
     // Name
     std::string getCriterionName() const override;
     // Type
@@ -58,10 +58,10 @@
     void resetModifiedStatus();
 
     /// Match methods
-    bool is(int iState) const;
-    bool isNot(int iState) const;
-    bool includes(int iState) const;
-    bool excludes(int iState) const;
+    bool is(uint64_t iState) const;
+    bool isNot(uint64_t iState) const;
+    bool includes(uint64_t iState) const;
+    bool excludes(uint64_t iState) const;
 
     /// User request
     std::string getFormattedDescription(bool bWithTypeInfo, bool bHumanReadable) const;
@@ -80,7 +80,7 @@
 
 private:
     // Current state
-    int _iState{0};
+    uint64_t _iState{0};
     // Type
     const CSelectionCriterionType *_pType;
 
diff --git a/upstream/parameter/SelectionCriterionRule.h b/upstream/parameter/SelectionCriterionRule.h
index 7dac343..cbdc5ca 100644
--- a/upstream/parameter/SelectionCriterionRule.h
+++ b/upstream/parameter/SelectionCriterionRule.h
@@ -89,7 +89,7 @@
     MatchesWhen _eMatchesWhen{EIs};
 
     // Value
-    int32_t _iMatchValue{0};
+    uint64_t _iMatchValue{0};
 
     // Used for XML MatchesWhen attribute parsing
     static const SMatchingRuleDescription _astMatchesWhen[ENbMatchesWhen];
diff --git a/upstream/parameter/SelectionCriterionType.cpp b/upstream/parameter/SelectionCriterionType.cpp
index d97d18b..fe8246f 100644
--- a/upstream/parameter/SelectionCriterionType.cpp
+++ b/upstream/parameter/SelectionCriterionType.cpp
@@ -51,14 +51,15 @@
 }
 
 // From ISelectionCriterionTypeInterface
-bool CSelectionCriterionType::addValuePair(int iValue, const std::string &strValue,
+bool CSelectionCriterionType::addValuePair(uint64_t iValue, const std::string &strValue,
                                            std::string &strError)
 {
     // Check 1 bit set only for inclusive types
     if (_bInclusive && (!iValue || (iValue & (iValue - 1)))) {
 
         std::ostringstream error;
-        error << "Rejecting value pair association: 0x" << std::hex << iValue << " - " << strValue
+        error << "CSelectionCriterionType Rejecting value pair association: 0x" << std::hex
+              << iValue << " - " << strValue
               << " for Selection Criterion Type " << getName();
         strError = error.str();
 
@@ -90,14 +91,14 @@
     return true;
 }
 
-bool CSelectionCriterionType::getNumericalValue(const std::string &strValue, int &iValue) const
+bool CSelectionCriterionType::getNumericalValue(const std::string &strValue, uint64_t &iValue) const
 {
     if (_bInclusive) {
 
         Tokenizer tok(strValue, _strDelimiter);
         std::vector<std::string> astrValues = tok.split();
         size_t uiNbValues = astrValues.size();
-        int iResult = 0;
+        uint64_t iResult = 0;
         size_t uiValueIndex;
         iValue = 0;
 
@@ -116,7 +117,7 @@
 }
 
 bool CSelectionCriterionType::getAtomicNumericalValue(const std::string &strValue,
-                                                      int &iValue) const
+                                                      uint64_t &iValue) const
 {
     auto it = _numToLitMap.find(strValue);
 
@@ -129,7 +130,7 @@
     return false;
 }
 
-bool CSelectionCriterionType::getLiteralValue(int iValue, std::string &strValue) const
+bool CSelectionCriterionType::getLiteralValue(uint64_t iValue, std::string &strValue) const
 {
     NumToLitMapConstIt it;
 
@@ -176,7 +177,7 @@
 }
 
 // Formatted state
-std::string CSelectionCriterionType::getFormattedState(int iValue) const
+std::string CSelectionCriterionType::getFormattedState(uint64_t iValue) const
 {
     std::string strFormattedState;
 
@@ -187,7 +188,7 @@
 
         for (size_t bit = 0; bit < sizeof(iValue) * CHAR_BIT; bit++) {
 
-            int iSingleBitValue = iValue & (1 << bit);
+            uint64_t iSingleBitValue = iValue & (0x1ull << bit);
 
             // Check if current bit is set
             if (!iSingleBitValue) {
diff --git a/upstream/parameter/SelectionCriterionType.h b/upstream/parameter/SelectionCriterionType.h
index 4b2f767..10ed919 100644
--- a/upstream/parameter/SelectionCriterionType.h
+++ b/upstream/parameter/SelectionCriterionType.h
@@ -36,13 +36,13 @@
 
 class CSelectionCriterionType : public CElement, public ISelectionCriterionTypeInterface
 {
-    typedef std::map<std::string, int>::const_iterator NumToLitMapConstIt;
+    typedef std::map<std::string, uint64_t>::const_iterator NumToLitMapConstIt;
 
 public:
     CSelectionCriterionType(bool bIsInclusive);
 
     // From ISelectionCriterionTypeInterface
-    bool addValuePair(int iValue, const std::string &strValue, std::string &strError) override;
+    bool addValuePair(uint64_t iValue, const std::string &strValue, std::string &strError) override;
     /**
      * Retrieve the numerical value from the std::string representation of the criterion type.
      *
@@ -53,15 +53,15 @@
      *
      * @return true if integer value retrieved from the std::string one, false otherwise.
      */
-    bool getNumericalValue(const std::string &strValue, int &iValue) const override;
-    bool getLiteralValue(int iValue, std::string &strValue) const override;
+    bool getNumericalValue(const std::string &strValue, uint64_t &iValue) const override;
+    bool getLiteralValue(uint64_t iValue, std::string &strValue) const override;
     bool isTypeInclusive() const override;
 
     // Value list
     std::string listPossibleValues() const;
 
     // Formatted state
-    std::string getFormattedState(int iValue) const override;
+    std::string getFormattedState(uint64_t iValue) const override;
 
     /**
       * Export to XML
@@ -85,9 +85,9 @@
      *
      * @return true if integer value retrieved from the std::string one, false otherwise.
      */
-    bool getAtomicNumericalValue(const std::string &strValue, int &iValue) const;
+    bool getAtomicNumericalValue(const std::string &strValue, uint64_t &iValue) const;
     bool _bInclusive;
-    std::map<std::string, int> _numToLitMap;
+    std::map<std::string, uint64_t> _numToLitMap;
 
     static const std::string _strDelimiter; /**< Inclusive criterion type delimiter. */
 };
diff --git a/upstream/parameter/include/SelectionCriterionInterface.h b/upstream/parameter/include/SelectionCriterionInterface.h
index 6eb2d8a..2080ff9 100644
--- a/upstream/parameter/include/SelectionCriterionInterface.h
+++ b/upstream/parameter/include/SelectionCriterionInterface.h
@@ -30,14 +30,15 @@
 #pragma once
 
 #include <string>
+#include <stdint.h>
 
 #include "SelectionCriterionTypeInterface.h"
 
 class ISelectionCriterionInterface
 {
 public:
-    virtual void setCriterionState(int iState) = 0;
-    virtual int getCriterionState() const = 0;
+    virtual void setCriterionState(uint64_t iState) = 0;
+    virtual uint64_t getCriterionState() const = 0;
     virtual std::string getCriterionName() const = 0;
     virtual const ISelectionCriterionTypeInterface *getCriterionType() const = 0;
 
diff --git a/upstream/parameter/include/SelectionCriterionTypeInterface.h b/upstream/parameter/include/SelectionCriterionTypeInterface.h
index bebcfc7..10f4c88 100644
--- a/upstream/parameter/include/SelectionCriterionTypeInterface.h
+++ b/upstream/parameter/include/SelectionCriterionTypeInterface.h
@@ -30,6 +30,7 @@
 #pragma once
 
 #include <string>
+#include <stdint.h>
 
 class ISelectionCriterionTypeInterface
 {
@@ -42,11 +43,12 @@
      * @param[out] strError string containing error information we can provide to client
      * @return true if succeed false otherwise
      */
-    virtual bool addValuePair(int iValue, const std::string &strValue, std::string &strError) = 0;
-    virtual bool getNumericalValue(const std::string &strValue, int &iValue) const = 0;
-    virtual bool getLiteralValue(int iValue, std::string &strValue) const = 0;
+    virtual bool addValuePair(uint64_t iValue, const std::string &strValue,
+                              std::string &strError) = 0;
+    virtual bool getNumericalValue(const std::string &strValue, uint64_t &iValue) const = 0;
+    virtual bool getLiteralValue(uint64_t iValue, std::string &strValue) const = 0;
     virtual bool isTypeInclusive() const = 0;
-    virtual std::string getFormattedState(int iValue) const = 0;
+    virtual std::string getFormattedState(uint64_t iValue) const = 0;
 
 protected:
     virtual ~ISelectionCriterionTypeInterface() {}
diff --git a/upstream/test/test-platform/TestPlatform.cpp b/upstream/test/test-platform/TestPlatform.cpp
index d090939..6e57f52 100644
--- a/upstream/test/test-platform/TestPlatform.cpp
+++ b/upstream/test/test-platform/TestPlatform.cpp
@@ -227,7 +227,7 @@
 
     bool bSuccess;
 
-    uint32_t state;
+    uint64_t state;
 
     if (convertTo(remoteCommand.getArgument(1), state)) {
         // Sucessfull conversion, set criterion state by numerical state
@@ -267,7 +267,7 @@
         const std::string &strValue = remoteCommand.getArgument(state + 1);
 
         // FIXME state type vs addValuePair params
-        if (!pCriterionType->addValuePair(int(state), strValue, strResult)) {
+        if (!pCriterionType->addValuePair(uint64_t(state), strValue, strResult)) {
 
             strResult = "Unable to add value: " + strValue + ": " + strResult;
 
@@ -294,7 +294,7 @@
 
         const std::string &strValue = remoteCommand.getArgument(state + 1);
 
-        if (!pCriterionType->addValuePair(0x1 << state, strValue, strResult)) {
+        if (!pCriterionType->addValuePair(0x1ull << state, strValue, strResult)) {
 
             strResult = "Unable to add value: " + strValue + ": " + strResult;
 
@@ -321,7 +321,7 @@
         ostrValue << state;
 
         // FIXME state type vs addValuePair params
-        if (!pCriterionType->addValuePair(int(state), ostrValue.str(), strResult)) {
+        if (!pCriterionType->addValuePair(uint64_t(state), ostrValue.str(), strResult)) {
 
             strResult = "Unable to add value: " + ostrValue.str() + ": " + strResult;
 
@@ -345,9 +345,9 @@
         std::ostringstream ostrValue;
 
         ostrValue << "State_0x";
-        ostrValue << (0x1 << state);
+        ostrValue << (0x1ull << state);
 
-        if (!pCriterionType->addValuePair(0x1 << state, ostrValue.str(), strResult)) {
+        if (!pCriterionType->addValuePair(0x1ull << state, ostrValue.str(), strResult)) {
 
             strResult = "Unable to add value: " + ostrValue.str() + ": " + strResult;
 
@@ -360,7 +360,7 @@
     return true;
 }
 
-bool CTestPlatform::setCriterionState(const string &strName, uint32_t uiState, string &strResult)
+bool CTestPlatform::setCriterionState(const string &strName, uint64_t uiState, string &strResult)
 {
     ISelectionCriterionInterface *pCriterion =
         mParameterMgrPlatformConnector.getSelectionCriterion(strName);
@@ -409,7 +409,7 @@
     }
 
     /// Translate lexical state to numerical state
-    int iNumericalState = 0;
+    uint64_t iNumericalState = 0;
     size_t lexicalSubStateIndex;
 
     // Parse lexical substates
diff --git a/upstream/test/test-platform/TestPlatform.h b/upstream/test/test-platform/TestPlatform.h
index 8917dbb..6e843b0 100644
--- a/upstream/test/test-platform/TestPlatform.h
+++ b/upstream/test/test-platform/TestPlatform.h
@@ -144,7 +144,7 @@
                                            std::string &strResult);
     bool createInclusiveSelectionCriterion(const std::string &strName, size_t nbValues,
                                            std::string &strResult);
-    bool setCriterionState(const std::string &strName, uint32_t uiState, std::string &strResult);
+    bool setCriterionState(const std::string &strName, uint64_t uiState, std::string &strResult);
     bool setCriterionStateByLexicalSpace(const IRemoteCommand &remoteCommand,
                                          std::string &strResult);
 
diff --git a/upstream/tools/xmlGenerator/domainGeneratorConnector.cpp b/upstream/tools/xmlGenerator/domainGeneratorConnector.cpp
index a83822f..9f40a31 100644
--- a/upstream/tools/xmlGenerator/domainGeneratorConnector.cpp
+++ b/upstream/tools/xmlGenerator/domainGeneratorConnector.cpp
@@ -136,7 +136,7 @@
     int index = 0;
     for (const auto &literalValue : tokens) {
         // inclusive criteria are bitfields
-        int numericalValue = inclusiveness ? 1 << index : index;
+        uint64_t numericalValue = inclusiveness ? 0x1ull << index : index;
         string error;
         bool success = criterionType->addValuePair(numericalValue, literalValue, error);