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:
Jiafei Wen 2013-08-29 14:25:53 -07:00
parent b58cab8e26
commit 50fa10247a

View file

@ -1163,10 +1163,12 @@ LocEngRequestTime::LocEngRequestTime(void* locEng) :
}
void LocEngRequestTime::proc() const {
loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)mLocEng;
if (locEng->request_utc_time_cb != NULL) {
locEng->request_utc_time_cb();
} else {
LOC_LOGE("Callback function for request time is NULL");
if (gps_conf.CAPABILITIES & GPS_CAPABILITY_ON_DEMAND_TIME) {
if (locEng->request_utc_time_cb != NULL) {
locEng->request_utc_time_cb();
} else {
LOC_LOGE("Callback function for request time is NULL");
}
}
}
inline void LocEngRequestTime::locallog() const {