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

Commit 23a5ae44 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Log PsdsServerConfigured in dumpsys" into tm-dev am: 887c94e6 am: f01c7f61

parents c64b0c2d f01c7f61
Loading
Loading
Loading
Loading
+16 −2
Original line number Diff line number Diff line
@@ -70,9 +70,14 @@ public class GnssConfiguration {
            "USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL";
    private static final String CONFIG_GPS_LOCK = "GPS_LOCK";
    private static final String CONFIG_ES_EXTENSION_SEC = "ES_EXTENSION_SEC";
    public static final String CONFIG_NFW_PROXY_APPS = "NFW_PROXY_APPS";
    public static final String CONFIG_ENABLE_PSDS_PERIODIC_DOWNLOAD =
    static final String CONFIG_NFW_PROXY_APPS = "NFW_PROXY_APPS";
    private static final String CONFIG_ENABLE_PSDS_PERIODIC_DOWNLOAD =
            "ENABLE_PSDS_PERIODIC_DOWNLOAD";
    static final String CONFIG_LONGTERM_PSDS_SERVER_1 = "LONGTERM_PSDS_SERVER_1";
    static final String CONFIG_LONGTERM_PSDS_SERVER_2 = "LONGTERM_PSDS_SERVER_2";
    static final String CONFIG_LONGTERM_PSDS_SERVER_3 = "LONGTERM_PSDS_SERVER_3";
    static final String CONFIG_NORMAL_PSDS_SERVER = "NORMAL_PSDS_SERVER";
    static final String CONFIG_REALTIME_PSDS_SERVER = "REALTIME_PSDS_SERVER";
    // Limit on NI emergency mode time extension after emergency sessions ends
    private static final int MAX_EMERGENCY_MODE_EXTENSION_SECONDS = 300;  // 5 minute maximum

@@ -201,6 +206,15 @@ public class GnssConfiguration {
        return getBooleanConfig(CONFIG_ENABLE_PSDS_PERIODIC_DOWNLOAD, false);
    }

    /**
     * Returns true if a long-term PSDS server is configured.
     */
    boolean isLongTermPsdsServerConfigured() {
        return (mProperties.getProperty(CONFIG_LONGTERM_PSDS_SERVER_1) != null
                || mProperties.getProperty(CONFIG_LONGTERM_PSDS_SERVER_2) != null
                || mProperties.getProperty(CONFIG_LONGTERM_PSDS_SERVER_3) != null);
    }

    /**
     * Updates the GNSS HAL satellite denylist.
     */
+2 −0
Original line number Diff line number Diff line
@@ -1574,6 +1574,8 @@ public class GnssLocationProvider extends AbstractLocationProvider implements
        pw.print(mGnssMetrics.dumpGnssMetricsAsText());
        if (dumpAll) {
            pw.println("mSupportsPsds=" + mSupportsPsds);
            pw.println(
                    "PsdsServerConfigured=" + mGnssConfiguration.isLongTermPsdsServerConfigured());
            pw.println("native internal state: ");
            pw.println("  " + mGnssNative.getInternalState());
        }
+10 −5
Original line number Diff line number Diff line
@@ -61,9 +61,12 @@ class GnssPsdsDownloader {
    GnssPsdsDownloader(Properties properties) {
        // read PSDS servers from the Properties object
        int count = 0;
        String longTermPsdsServer1 = properties.getProperty("LONGTERM_PSDS_SERVER_1");
        String longTermPsdsServer2 = properties.getProperty("LONGTERM_PSDS_SERVER_2");
        String longTermPsdsServer3 = properties.getProperty("LONGTERM_PSDS_SERVER_3");
        String longTermPsdsServer1 = properties.getProperty(
                GnssConfiguration.CONFIG_LONGTERM_PSDS_SERVER_1);
        String longTermPsdsServer2 = properties.getProperty(
                GnssConfiguration.CONFIG_LONGTERM_PSDS_SERVER_2);
        String longTermPsdsServer3 = properties.getProperty(
                GnssConfiguration.CONFIG_LONGTERM_PSDS_SERVER_3);
        if (longTermPsdsServer1 != null) count++;
        if (longTermPsdsServer2 != null) count++;
        if (longTermPsdsServer3 != null) count++;
@@ -83,8 +86,10 @@ class GnssPsdsDownloader {
            mNextServerIndex = random.nextInt(count);
        }

        String normalPsdsServer = properties.getProperty("NORMAL_PSDS_SERVER");
        String realtimePsdsServer = properties.getProperty("REALTIME_PSDS_SERVER");
        String normalPsdsServer = properties.getProperty(
                GnssConfiguration.CONFIG_NORMAL_PSDS_SERVER);
        String realtimePsdsServer = properties.getProperty(
                GnssConfiguration.CONFIG_REALTIME_PSDS_SERVER);
        mPsdsServers = new String[MAX_PSDS_TYPE_INDEX + 1];
        mPsdsServers[NORMAL_PSDS_SERVER_INDEX] = normalPsdsServer;
        mPsdsServers[REALTIME_PSDS_SERVER_INDEX] = realtimePsdsServer;