From 276278d725aff28911e98b84a34307fe5b1f0a47 Mon Sep 17 00:00:00 2001 From: Yipeng Cao Date: Thu, 18 May 2017 13:27:30 -0700 Subject: [PATCH] Revert the system clock in the debug oc-dev System.currentTimeMillis does not guarantee to be monotonically increasing, changed to SystemClock.elapsedRealtime Bug: 38317243 Fixes: 38317243 Test: make -j 32; flash the angler device using local build Change-Id: I775e6251f780679d639418a260c6d44c363a0c0f --- .../java/com/android/server/location/GnssLocationProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/location/GnssLocationProvider.java b/services/core/java/com/android/server/location/GnssLocationProvider.java index 85d89865a0744..3fd91dc3b3d51 100644 --- a/services/core/java/com/android/server/location/GnssLocationProvider.java +++ b/services/core/java/com/android/server/location/GnssLocationProvider.java @@ -937,9 +937,9 @@ public class GnssLocationProvider implements LocationProviderInterface { long time = mNtpTime.getCachedNtpTime(); long timeReference = mNtpTime.getCachedNtpTimeReference(); long certainty = mNtpTime.getCacheCertainty(); - long now = SystemClock.elapsedRealtime(); if (DEBUG) { + long now = System.currentTimeMillis(); Log.d(TAG, "NTP server returned: " + time + " (" + new Date(time) + ") reference: " + timeReference