Merge "Loading gps_debug configuration before use" into oc-dev
diff --git a/services/core/java/com/android/server/location/GnssLocationProvider.java b/services/core/java/com/android/server/location/GnssLocationProvider.java
index fdaa599..91c32e4 100644
--- a/services/core/java/com/android/server/location/GnssLocationProvider.java
+++ b/services/core/java/com/android/server/location/GnssLocationProvider.java
@@ -578,6 +578,10 @@
                 // override default value of this if lpp_prof is not empty
                 properties.setProperty("LPP_PROFILE", lpp_prof);
         }
+        /*
+         * Overlay carrier properties from a debug configuration file.
+         */
+        loadPropertiesFromFile(DEBUG_PROPERTIES_FILE, properties);
         // TODO: we should get rid of C2K specific setting.
         setSuplHostPort(properties.getProperty("SUPL_HOST"),
                         properties.getProperty("SUPL_PORT"));
@@ -590,10 +594,6 @@
                 Log.e(TAG, "unable to parse C2K_PORT: " + portString);
             }
         }
-        /*
-         * Allow carrier properties to be loaded from a  debug configuration file.
-         */
-        loadPropertiesFromFile(DEBUG_PROPERTIES_FILE, properties);
         if (native_is_gnss_configuration_supported()) {
             Map<String, SetCarrierProperty> map = new HashMap<String, SetCarrierProperty>() {
                 {
@@ -667,7 +667,7 @@
             }
 
         } catch (IOException e) {
-            Log.v(TAG, "Could not open GPS configuration file " + filename);
+            if (DEBUG) Log.d(TAG, "Could not open GPS configuration file " + filename);
             return false;
         }
         return true;