Loading services/core/java/com/android/server/location/gnss/GnssMeasurementsProvider.java +10 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,16 @@ public final class GnssMeasurementsProvider extends if (request.getIntervalMillis() == GnssMeasurementRequest.PASSIVE_INTERVAL) { return true; } // The HAL doc does not specify if consecutive start() calls will be allowed. // Some vendors may ignore the 2nd start() call if stop() is not called. // Thus, here we always call stop() before calling start() to avoid being ignored. if (mGnssNative.stopMeasurementCollection()) { if (D) { Log.d(TAG, "stopping gnss measurements"); } } else { Log.e(TAG, "error stopping gnss measurements"); } if (mGnssNative.startMeasurementCollection(request.isFullTracking(), request.isCorrelationVectorOutputsEnabled(), request.getIntervalMillis())) { Loading Loading
services/core/java/com/android/server/location/gnss/GnssMeasurementsProvider.java +10 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,16 @@ public final class GnssMeasurementsProvider extends if (request.getIntervalMillis() == GnssMeasurementRequest.PASSIVE_INTERVAL) { return true; } // The HAL doc does not specify if consecutive start() calls will be allowed. // Some vendors may ignore the 2nd start() call if stop() is not called. // Thus, here we always call stop() before calling start() to avoid being ignored. if (mGnssNative.stopMeasurementCollection()) { if (D) { Log.d(TAG, "stopping gnss measurements"); } } else { Log.e(TAG, "error stopping gnss measurements"); } if (mGnssNative.startMeasurementCollection(request.isFullTracking(), request.isCorrelationVectorOutputsEnabled(), request.getIntervalMillis())) { Loading