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

Commit 74675369 authored by Gabriele M's avatar Gabriele M
Browse files

Don't disable the GPS prematurely

Since commit b2b44897
("Use SystemClock.elapsedRealtime() to calc TTFF") mLastFixTime
stores the time since boot rather than the current real time.

REGRESSION-1032

Change-Id: I39474a66c6d7dbd9ca0ff50a5a1b9c06007725c4
parent 9f7aa446
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1672,7 +1672,7 @@ public class GnssLocationProvider implements LocationProviderInterface {
        updateStatus(mStatus, usedInFixCount);

        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);