Loading services/core/java/com/android/server/location/GnssLocationProvider.java +5 −5 Original line number Diff line number Diff line Loading @@ -943,7 +943,7 @@ public class GnssLocationProvider implements LocationProviderInterface { long time = mNtpTime.getCachedNtpTime(); long timeReference = mNtpTime.getCachedNtpTimeReference(); long certainty = mNtpTime.getCacheCertainty(); long now = System.currentTimeMillis(); long now = SystemClock.elapsedRealtime(); if (DEBUG) { Log.d(TAG, "NTP server returned: " Loading Loading @@ -1458,7 +1458,7 @@ public class GnssLocationProvider implements LocationProviderInterface { // reset SV count to zero updateStatus(LocationProvider.TEMPORARILY_UNAVAILABLE, 0, 0, 0); mFixRequestTime = System.currentTimeMillis(); mFixRequestTime = SystemClock.elapsedRealtime(); if (!hasCapability(GPS_CAPABILITY_SCHEDULING)) { // set timer to give up if we do not receive a fix within NO_FIX_TIMEOUT // and our fix interval is not short Loading Loading @@ -1535,12 +1535,12 @@ public class GnssLocationProvider implements LocationProviderInterface { mGnssMetrics.logPositionAccuracyMeters(location.getAccuracy()); } if (mTimeToFirstFix > 0) { int timeBetweenFixes = (int) (System.currentTimeMillis() - mLastFixTime); int timeBetweenFixes = (int) (SystemClock.elapsedRealtime() - mLastFixTime); mGnssMetrics.logMissedReports(mFixInterval, timeBetweenFixes); } } mLastFixTime = System.currentTimeMillis(); mLastFixTime = SystemClock.elapsedRealtime(); // report time to first fix if (mTimeToFirstFix == 0 && hasLatLong) { mTimeToFirstFix = (int)(mLastFixTime - mFixRequestTime); Loading Loading @@ -1665,7 +1665,7 @@ public class GnssLocationProvider implements LocationProviderInterface { updateStatus(mStatus, usedInFixCount, meanCn0, maxCn0); if (mNavigating && mStatus == LocationProvider.AVAILABLE && mLastFixTime > 0 && System.currentTimeMillis() - mLastFixTime > RECENT_FIX_TIMEOUT) { SystemClock.elapsedRealtime() - mLastFixTime > RECENT_FIX_TIMEOUT) { // send an intent to notify that the GPS is no longer receiving fixes. Intent intent = new Intent(LocationManager.GPS_FIX_CHANGE_ACTION); intent.putExtra(LocationManager.EXTRA_GPS_ENABLED, false); Loading Loading
services/core/java/com/android/server/location/GnssLocationProvider.java +5 −5 Original line number Diff line number Diff line Loading @@ -943,7 +943,7 @@ public class GnssLocationProvider implements LocationProviderInterface { long time = mNtpTime.getCachedNtpTime(); long timeReference = mNtpTime.getCachedNtpTimeReference(); long certainty = mNtpTime.getCacheCertainty(); long now = System.currentTimeMillis(); long now = SystemClock.elapsedRealtime(); if (DEBUG) { Log.d(TAG, "NTP server returned: " Loading Loading @@ -1458,7 +1458,7 @@ public class GnssLocationProvider implements LocationProviderInterface { // reset SV count to zero updateStatus(LocationProvider.TEMPORARILY_UNAVAILABLE, 0, 0, 0); mFixRequestTime = System.currentTimeMillis(); mFixRequestTime = SystemClock.elapsedRealtime(); if (!hasCapability(GPS_CAPABILITY_SCHEDULING)) { // set timer to give up if we do not receive a fix within NO_FIX_TIMEOUT // and our fix interval is not short Loading Loading @@ -1535,12 +1535,12 @@ public class GnssLocationProvider implements LocationProviderInterface { mGnssMetrics.logPositionAccuracyMeters(location.getAccuracy()); } if (mTimeToFirstFix > 0) { int timeBetweenFixes = (int) (System.currentTimeMillis() - mLastFixTime); int timeBetweenFixes = (int) (SystemClock.elapsedRealtime() - mLastFixTime); mGnssMetrics.logMissedReports(mFixInterval, timeBetweenFixes); } } mLastFixTime = System.currentTimeMillis(); mLastFixTime = SystemClock.elapsedRealtime(); // report time to first fix if (mTimeToFirstFix == 0 && hasLatLong) { mTimeToFirstFix = (int)(mLastFixTime - mFixRequestTime); Loading Loading @@ -1665,7 +1665,7 @@ public class GnssLocationProvider implements LocationProviderInterface { updateStatus(mStatus, usedInFixCount, meanCn0, maxCn0); if (mNavigating && mStatus == LocationProvider.AVAILABLE && mLastFixTime > 0 && System.currentTimeMillis() - mLastFixTime > RECENT_FIX_TIMEOUT) { SystemClock.elapsedRealtime() - mLastFixTime > RECENT_FIX_TIMEOUT) { // send an intent to notify that the GPS is no longer receiving fixes. Intent intent = new Intent(LocationManager.GPS_FIX_CHANGE_ACTION); intent.putExtra(LocationManager.EXTRA_GPS_ENABLED, false); Loading