Add to check ZPP report condition for NMEA generation

NMEA is supposed to be generated only when GPS tracking
is going on in GPS HAL but it was also observed when
ZPP report, so add a check if isInSession is true to
avoid that.

Change-Id: Ia6152fe78243d45e71adccce956d0a727c3f17a2
This commit is contained in:
ethan.kim 2015-06-24 15:46:43 -07:00 committed by Gerrit - the friendly Code Review server
parent f72e672afe
commit 1dfdcabc87

View file

@ -815,8 +815,14 @@ void LocEngReportPosition::proc() const {
locEng->adapter->setInSession(false);
}
LOC_LOGV("LocEngReportPosition::proc() - generateNmea: %d, position source: %d, "
"engine_status: %d, isInSession: %d",
locEng->generateNmea, mLocation.position_source,
locEng->engine_status, locEng->adapter->isInSession());
if (locEng->generateNmea &&
mLocation.position_source == ULP_LOCATION_IS_FROM_GNSS &&
locEng->adapter->isInSession() &&
mTechMask & (LOC_POS_TECH_MASK_SATELLITE |
LOC_POS_TECH_MASK_SENSORS |
LOC_POS_TECH_MASK_HYBRID))