Adding check of on_demand_time for inject time
Before injecting time, check the gps ON_DEMAND_TIME capability. if it is disabled, it will not sent time inject command. Change-Id: Ie51cf1f65e086bdb49d6159051c3d66700b25d78
This commit is contained in:
parent
b58cab8e26
commit
50fa10247a
1 changed files with 6 additions and 4 deletions
|
@ -1163,12 +1163,14 @@ LocEngRequestTime::LocEngRequestTime(void* locEng) :
|
||||||
}
|
}
|
||||||
void LocEngRequestTime::proc() const {
|
void LocEngRequestTime::proc() const {
|
||||||
loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mLocEng;
|
loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mLocEng;
|
||||||
|
if (gps_conf.CAPABILITIES & GPS_CAPABILITY_ON_DEMAND_TIME) {
|
||||||
if (locEng->request_utc_time_cb != NULL) {
|
if (locEng->request_utc_time_cb != NULL) {
|
||||||
locEng->request_utc_time_cb();
|
locEng->request_utc_time_cb();
|
||||||
} else {
|
} else {
|
||||||
LOC_LOGE("Callback function for request time is NULL");
|
LOC_LOGE("Callback function for request time is NULL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
inline void LocEngRequestTime::locallog() const {
|
inline void LocEngRequestTime::locallog() const {
|
||||||
LOC_LOGV("LocEngReqTime");
|
LOC_LOGV("LocEngReqTime");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue