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

Commit 99b44994 authored by Chirayu Desai's avatar Chirayu Desai Committed by Michael Bestas
Browse files

Ignore AGPS toggle during user-initiated emergency calls

* The location toggle itself is already ignored during
  emergency calls.
* Also ignore the AGPS toggle during that to not
  change behavior around emergency calls, we never
  want to affect those, because life is everything.

Issue: calyxos#1490
Change-Id: Iab13be99ccd65e0fdabcb67a25d73944ef24556a
parent 5df3442b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1096,6 +1096,7 @@ public class GnssLocationProvider extends AbstractLocationProvider implements
    private void startNavigating() {
        if (!mStarted) {
            if (DEBUG) Log.d(TAG, "startNavigating");
            final Boolean isEmergency = mNIHandler.getInEmergency();
            mTimeToFirstFix = 0;
            mLastFixTime = 0;
            setStarted(true);
@@ -1103,7 +1104,7 @@ public class GnssLocationProvider extends AbstractLocationProvider implements

            boolean agpsEnabled =
                    (Settings.Global.getInt(mContext.getContentResolver(),
                            Settings.Global.ASSISTED_GPS_ENABLED, 1) != 0);
                            Settings.Global.ASSISTED_GPS_ENABLED, 1) != 0) || isEmergency;
            mPositionMode = getSuplMode(agpsEnabled);

            if (DEBUG) {