Merge "Always use fresh NTP time for GPS" into ics-mr0

This commit is contained in:
Mike Lockwood
2011-10-25 06:51:28 -07:00
committed by Android (Google) Code Review

View File

@@ -554,13 +554,8 @@ public class GpsLocationProvider implements LocationProviderInterface {
long delay;
// force refresh NTP cache when outdated
if (mNtpTime.getCacheAge() >= NTP_INTERVAL) {
mNtpTime.forceRefresh();
}
// only update when NTP time is fresh
if (mNtpTime.getCacheAge() < NTP_INTERVAL) {
// GPS requires fresh NTP time
if (mNtpTime.forceRefresh()) {
long time = mNtpTime.getCachedNtpTime();
long timeReference = mNtpTime.getCachedNtpTimeReference();
long certainty = mNtpTime.getCacheCertainty();