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

Commit 311a9093 authored by Yu-Han Yang's avatar Yu-Han Yang
Browse files

Support NLP request pierce location setting in emergency mode

Fixes: 153483024

Test: existing tests passing
Change-Id: Ic6eba24a8db4d98da6ad1e442bc53a9a16294d9e
parent 3bf50bdd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -809,11 +809,11 @@ public class GnssLocationProvider extends AbstractLocationProvider implements
        locationRequest.setProvider(provider);

        // Ignore location settings if in emergency mode. This is only allowed for
        // isUserEmergency request (introduced in HAL v2.0), or DBH request in HAL v1.1.
        // isUserEmergency request (introduced in HAL v2.0), or HAL v1.1.
        if (mNIHandler.getInEmergency()) {
            GnssConfiguration.HalInterfaceVersion halVersion =
                    mGnssConfiguration.getHalInterfaceVersion();
            if (isUserEmergency || (halVersion.mMajor < 2 && !independentFromGnss)) {
            if (isUserEmergency || halVersion.mMajor < 2) {
                locationRequest.setLocationSettingsIgnored(true);
                durationMillis *= EMERGENCY_LOCATION_UPDATE_DURATION_MULTIPLIER;
            }