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

Commit cd7c30a9 authored by Tommy Webb's avatar Tommy Webb Committed by Mohammed Althaf T
Browse files

Remove sensitive info from SUPL requests



Except in case of emergency, do not include sensitive subscriber
information in SUPL requests (A-GPS).

Issue: calyxos#618
Co-Authored-By: default avatarMSe1969 <mse1969@posteo.de>
Co-Authored-By: default avatarMichael Bestas <mkbestas@gmail.com>
Change-Id: I9f372cfcf02d3b768bd5cf1de220eea1fe8c1dbb
parent 1fa6e5b7
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1601,6 +1601,13 @@ public class GnssLocationProvider extends AbstractLocationProvider implements
        int type = AGPS_SETID_TYPE_NONE;
        String setId = null;

        // Unless we are in an emergency, do not provide sensitive subscriber information
        // to SUPL servers.
        if (!mNIHandler.getInEmergency()) {
            mGnssNative.setAgpsSetId(type, "");
            return;
        }

        int ddSubId = SubscriptionManager.getDefaultDataSubscriptionId();
        if (SubscriptionManager.isValidSubscriptionId(ddSubId)) {
            phone = phone.createForSubscriptionId(ddSubId);