flo: gps: Correct week rollover timestamps
This adjustment will help with applications checking the time coming from gps. Some applictions will consider times in the far past as an error. Change-Id: I69d6971249c4898ac3895f725e46f268cdb2b00d
This commit is contained in:
parent
af6d7661b9
commit
da6c91b4c7
|
@ -197,6 +197,11 @@ void LocApiBase::reportPosition(UlpLocation &location,
|
|||
enum loc_sess_status status,
|
||||
LocPosTechMask loc_technology_mask)
|
||||
{
|
||||
if (location.gpsLocation.timestamp > 0 && location.gpsLocation.timestamp <1580000000000) {
|
||||
location.gpsLocation.timestamp = location.gpsLocation.timestamp + 619315200000;
|
||||
LOC_LOGV("week rollover fixed, timestamp: %lld.", location.gpsLocation.timestamp);
|
||||
}
|
||||
|
||||
// loop through adapters, and deliver to all adapters.
|
||||
TO_ALL_LOCADAPTERS(
|
||||
mLocAdapters[i]->reportPosition(location,
|
||||
|
|
Loading…
Reference in New Issue