Merge "Loads gps_debug.conf from vendor path before system path" into udc-dev
This commit is contained in:
@@ -54,7 +54,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";
|
||||
@@ -285,7 +287,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();
|
||||
@@ -392,9 +395,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);
|
||||
@@ -403,7 +406,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user