Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 276278d7 authored by Yipeng Cao's avatar Yipeng Cao
Browse files

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
parent 6c0aba7d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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