mirror of
https://github.com/S3NEO/android_device_samsung_msm8226-common.git
synced 2024-11-06 21:55:45 +00:00
msm8226-common: 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
98897a72ab
commit
6cc6f05cb7
1 changed files with 6 additions and 0 deletions
|
@ -240,6 +240,12 @@ void LocApiBase::reportPosition(UlpLocation &location,
|
|||
location.gpsLocation.bearing, location.gpsLocation.accuracy,
|
||||
location.gpsLocation.timestamp, location.rawDataSize,
|
||||
location.rawData, status, loc_technology_mask);
|
||||
|
||||
if (location.gpsLocation.timestamp > 0 && location.gpsLocation.timestamp < 1580000000000) {
|
||||
location.gpsLocation.timestamp += 619315200000; /* 1024 * 7 * 24 * 60 * 60 * 1000 */
|
||||
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 a new issue