fix multiple GPS_LOCK request
donot send GPS_LOCK request when new gpsLock is the same as last one. Change-Id: Ifb87018d11aef0383762b9b132742faf3d4d7e79 CRs-fixed: 2360896
This commit is contained in:
parent
148b0dd3b2
commit
f7c6bf552a
1 changed files with 5 additions and 4 deletions
|
@ -846,13 +846,14 @@ GnssAdapter::gnssUpdateConfigCommand(GnssConfig config)
|
|||
|
||||
if (gnssConfigRequested.flags & GNSS_CONFIG_FLAGS_GPS_LOCK_VALID_BIT) {
|
||||
uint32_t newGpsLock = mAdapter.convertGpsLock(gnssConfigRequested.gpsLock);
|
||||
ContextBase::mGps_conf.GPS_LOCK = newGpsLock;
|
||||
if (0 == ContextBase::mGps_conf.GPS_LOCK) {
|
||||
ContextBase::mGps_conf.GPS_LOCK = 3;
|
||||
if (0 == newGpsLock) {
|
||||
newGpsLock = 3;
|
||||
}
|
||||
if (0 != mAdapter.getPowerVoteId()) {
|
||||
if (newGpsLock == ContextBase::mGps_conf.GPS_LOCK ||
|
||||
0 != mAdapter.getPowerVoteId()) {
|
||||
gnssConfigNeedEngineUpdate.flags &= ~(GNSS_CONFIG_FLAGS_GPS_LOCK_VALID_BIT);
|
||||
}
|
||||
ContextBase::mGps_conf.GPS_LOCK = newGpsLock;
|
||||
index++;
|
||||
}
|
||||
if (gnssConfigRequested.flags & GNSS_CONFIG_FLAGS_SUPL_VERSION_VALID_BIT) {
|
||||
|
|
Loading…
Reference in a new issue