GPS lock is stuck as disabled after post powerup enablement
when the device boots with gps disabled in settings and later enabled post pwoer up, the lock state doesn't get updated correctly. Bug: 16131208 CRs-fixed: 736966 Change-Id: Ice8237a3fd67740819de573ffebbab851363163d
This commit is contained in:
parent
d1cc6bfee7
commit
ff78fb363c
2 changed files with 4 additions and 5 deletions
|
@ -331,10 +331,11 @@ static int loc_init(GpsCallbacks* callbacks)
|
|||
gps_sv_cb = callbacks->sv_status_cb;
|
||||
|
||||
retVal = loc_eng_init(loc_afw_data, &clientCallbacks, event, NULL);
|
||||
loc_afw_data.adapter->requestUlp(gps_conf.CAPABILITIES);
|
||||
loc_afw_data.adapter->mSupportsAgpsRequests = !loc_afw_data.adapter->hasAgpsExtendedCapabilities();
|
||||
loc_afw_data.adapter->mSupportsPositionInjection = !loc_afw_data.adapter->hasCPIExtendedCapabilities();
|
||||
loc_afw_data.adapter->mSupportsTimeInjection = !loc_afw_data.adapter->hasCPIExtendedCapabilities();
|
||||
loc_afw_data.adapter->setGpsLockMsg(0);
|
||||
loc_afw_data.adapter->requestUlp(gps_conf.CAPABILITIES);
|
||||
|
||||
if(retVal) {
|
||||
LOC_LOGE("loc_eng_init() fail!");
|
||||
|
@ -493,6 +494,7 @@ static void loc_cleanup()
|
|||
ENTRY_LOG();
|
||||
|
||||
loc_afw_data.adapter->setPowerVote(false);
|
||||
loc_afw_data.adapter->setGpsLockMsg(gps_conf.GPS_LOCK);
|
||||
|
||||
loc_eng_cleanup(loc_afw_data);
|
||||
loc_close_mdm_node();
|
||||
|
|
|
@ -1618,8 +1618,7 @@ int loc_eng_init(loc_eng_data_s_type &loc_eng_data, LocCallbacks* callbacks,
|
|||
}
|
||||
|
||||
STATE_CHECK((NULL == loc_eng_data.adapter),
|
||||
"instance already initialized",
|
||||
return loc_eng_data.adapter->setGpsLockMsg(0));
|
||||
"instance already initialized", return 0);
|
||||
|
||||
memset(&loc_eng_data, 0, sizeof (loc_eng_data));
|
||||
|
||||
|
@ -1762,8 +1761,6 @@ void loc_eng_cleanup(loc_eng_data_s_type &loc_eng_data)
|
|||
loc_eng_stop(loc_eng_data);
|
||||
}
|
||||
|
||||
loc_eng_data.adapter->setGpsLockMsg(gps_conf.GPS_LOCK);
|
||||
|
||||
#if 0 // can't afford to actually clean up, for many reason.
|
||||
|
||||
LOC_LOGD("loc_eng_init: client opened. close it now.");
|
||||
|
|
Loading…
Reference in a new issue