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

Commit b7be5447 authored by Mike Lockwood's avatar Mike Lockwood
Browse files

GpsLocationProvider: Be less aggressive about getting fixes in bad conditions...


GpsLocationProvider: Be less aggressive about getting fixes in bad conditions if we have a long fix interval.

Change-Id: I68bd884409ca15e584ab70e53cf142d60f318d9c
BUG: 2215714

Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent 63598a06
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -761,7 +761,7 @@ public class GpsLocationProvider implements LocationProviderInterface {
                positionMode = GPS_POSITION_MODE_STANDALONE;
            }

            if (!native_start(positionMode, false, mFixInterval)) {
            if (!native_start(positionMode, false, 1)) {
                mStarted = false;
                Log.e(TAG, "native_start failed in startNavigating()");
                return;
@@ -872,7 +872,12 @@ public class GpsLocationProvider implements LocationProviderInterface {
        }

        if (mStarted && mStatus != LocationProvider.AVAILABLE) {
            // we still want to time out if we do not receive MIN_FIX_COUNT
            // within the time out and we are requesting infrequent fixes
            if (mFixInterval < NO_FIX_TIMEOUT) {
                mAlarmManager.cancel(mTimeoutIntent);
            }

            // send an intent to notify that the GPS is receiving fixes.
            Intent intent = new Intent(GPS_FIX_CHANGE_ACTION);
            intent.putExtra(EXTRA_ENABLED, true);