We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 842f0f4 + 2ffe0ad commit 940453fCopy full SHA for 940453f
services/java/com/android/server/location/GpsLocationProvider.java
@@ -554,13 +554,8 @@ private void handleInjectNtpTime() {
554
555
long delay;
556
557
- // force refresh NTP cache when outdated
558
- if (mNtpTime.getCacheAge() >= NTP_INTERVAL) {
559
- mNtpTime.forceRefresh();
560
- }
561
-
562
- // only update when NTP time is fresh
563
- if (mNtpTime.getCacheAge() < NTP_INTERVAL) {
+ // GPS requires fresh NTP time
+ if (mNtpTime.forceRefresh()) {
564
long time = mNtpTime.getCachedNtpTime();
565
long timeReference = mNtpTime.getCachedNtpTimeReference();
566
long certainty = mNtpTime.getCacheCertainty();
0 commit comments