diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2023-03-25 04:11:50 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-03-25 04:11:50 +0000 |
commit | 0978ec77ff341cb94f8101d2e1d36ea7ccea8407 (patch) | |
tree | ff9748560732913270e47184b27b46f505270457 | |
parent | 18232c027ea49a36865a7ab33a514a457747e467 (diff) | |
parent | 889ae095b7eeaa3cf15165aa3058b71b9b813dae (diff) | |
download | base-0978ec77ff341cb94f8101d2e1d36ea7ccea8407.tar.gz |
Merge "Loads gps_debug.conf from vendor path before system path" into android12-gsi
-rw-r--r-- | services/core/java/com/android/server/location/gnss/GnssConfiguration.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/services/core/java/com/android/server/location/gnss/GnssConfiguration.java b/services/core/java/com/android/server/location/gnss/GnssConfiguration.java index 7db234a29942..859b42948a43 100644 --- a/services/core/java/com/android/server/location/gnss/GnssConfiguration.java +++ b/services/core/java/com/android/server/location/gnss/GnssConfiguration.java @@ -53,7 +53,9 @@ public class GnssConfiguration { private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG); - private static final String DEBUG_PROPERTIES_FILE = "/etc/gps_debug.conf"; + private static final String DEBUG_PROPERTIES_SYSTEM_FILE = "/etc/gps_debug.conf"; + + private static final String DEBUG_PROPERTIES_VENDOR_FILE = "/vendor/etc/gps_debug.conf"; // config.xml properties private static final String CONFIG_SUPL_HOST = "SUPL_HOST"; @@ -225,7 +227,8 @@ public class GnssConfiguration { /* * Overlay carrier properties from a debug configuration file. */ - loadPropertiesFromGpsDebugConfig(mProperties); + loadPropertiesFromGpsDebugConfig(mProperties, DEBUG_PROPERTIES_VENDOR_FILE); + loadPropertiesFromGpsDebugConfig(mProperties, DEBUG_PROPERTIES_SYSTEM_FILE); mEsExtensionSec = getRangeCheckedConfigEsExtensionSec(); logConfigurations(); @@ -331,9 +334,9 @@ public class GnssConfiguration { } } - private void loadPropertiesFromGpsDebugConfig(Properties properties) { + private void loadPropertiesFromGpsDebugConfig(Properties properties, String filePath) { try { - File file = new File(DEBUG_PROPERTIES_FILE); + File file = new File(filePath); FileInputStream stream = null; try { stream = new FileInputStream(file); @@ -342,7 +345,7 @@ public class GnssConfiguration { IoUtils.closeQuietly(stream); } } catch (IOException e) { - if (DEBUG) Log.d(TAG, "Could not open GPS configuration file " + DEBUG_PROPERTIES_FILE); + if (DEBUG) Log.d(TAG, "Could not open GPS configuration file " + filePath); } } |