summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorMike Cailean <mcailean@codeaurora.org>2020-08-25 14:18:08 -0700
committerMike Cailean <mcailean@codeaurora.org>2020-08-25 17:59:37 -0700
commitaefcd7c8c3bd3a40a2cf45f340eec07b6766c8ad (patch)
tree63f5f0ee71d00704da214d41ad0184c01cece016 /core
parent6163caeb3974975963c9b78106f15b0331c2ceec (diff)
Fix flawed logic for environment aiding feature
Environment aiding has to be injected only when SAP is PREMIUM_ENV_AIDING. The logic to determine this is flawed. CRs-fixed: 2762826 Change-Id: I4b994de4e954f30ecb663858070b93019b85ad4c
Diffstat (limited to 'core')
-rw-r--r--core/ContextBase.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/ContextBase.cpp b/core/ContextBase.cpp
index 9cf3828..411c990 100644
--- a/core/ContextBase.cpp
+++ b/core/ContextBase.cpp
@@ -338,7 +338,7 @@ void ContextBase::setEngineCapabilities(uint64_t supportedMsgMask,
static uint8_t isSapModeKnown = 0;
if (!isSapModeKnown) {
- /* Check if SAP is PREMIUM_ENV_AIDING in sap.conf */
+ /* Check if SAP is PREMIUM_ENV_AIDING in izat.conf */
char conf_feature_sap[LOC_MAX_PARAM_STRING];
loc_param_s_type izat_conf_feature_table[] =
{
@@ -352,8 +352,9 @@ void ContextBase::setEngineCapabilities(uint64_t supportedMsgMask,
uint8_t bitPos = LOC_SUPPORTED_FEATURE_MEASUREMENTS_CORRECTION & 7;
if (arrayIndex < MAX_FEATURE_LENGTH) {
- ContextBase::sFeaturesSupported[arrayIndex] &=
- ~(ContextBase::sFeaturesSupported[arrayIndex] >> bitPos);
+ /* To disable the feature we need to reset the bit on the "bitPos"
+ position, so shift a "1" to the left by "bitPos" */
+ ContextBase::sFeaturesSupported[arrayIndex] &= ~(1 << bitPos);
}
}
}