Merge "Log PsdsServerConfigured in dumpsys" into tm-dev am: 887c94e629 am: f01c7f6123
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17666655 Change-Id: I3e8831d5a53a7d638efdbd9548b243b22bd03e0f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user