Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84066720 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Always call stopMeasurementCollection before...

Merge "Always call stopMeasurementCollection before startMeasurementCollection" into tm-qpr-dev am: a577c1d8

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20228988



Change-Id: Iebb61cb45c3b56e3d5888728ade0f1b7eabda84b
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 0236ce5a a577c1d8
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -113,6 +113,16 @@ public final class GnssMeasurementsProvider extends
    @Override
    protected boolean registerWithService(GnssMeasurementRequest request,
            Collection<GnssListenerRegistration> registrations) {
        // 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())) {