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

Unverified Commit 94e5ea52 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 c174e1c4
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1205,6 +1205,7 @@ public class GnssLocationProvider extends AbstractLocationProvider implements
    private void startNavigating() {
    private void startNavigating() {
        if (!mStarted) {
        if (!mStarted) {
            if (DEBUG) Log.d(TAG, "startNavigating");
            if (DEBUG) Log.d(TAG, "startNavigating");
            final Boolean isEmergency = mNIHandler.getInEmergency();
            mTimeToFirstFix = 0;
            mTimeToFirstFix = 0;
            mLastFixTime = 0;
            mLastFixTime = 0;
            setStarted(true);
            setStarted(true);
@@ -1212,7 +1213,7 @@ public class GnssLocationProvider extends AbstractLocationProvider implements


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


            if (DEBUG) {
            if (DEBUG) {