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

Commit 872a373a authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "interval change should restart thread reporting locations" into main

parents 049b7995 f77de292
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -298,8 +298,14 @@ ScopedAStatus Gnss::deleteAidingData(GnssAidingData aidingDataFlags) {
ScopedAStatus Gnss::setPositionMode(const PositionModeOptions& options) {
    ALOGD("setPositionMode. minIntervalMs:%d, lowPowerMode:%d", options.minIntervalMs,
          (int)options.lowPowerMode);
    if (std::max(1000, options.minIntervalMs) != mMinIntervalMs) {
        mMinIntervalMs = std::max(1000, options.minIntervalMs);
        mGnssMeasurementInterface->setLocationInterval(mMinIntervalMs);
        if (mIsActive) {
            stop();
            start();
        }
    }
    return ScopedAStatus::ok();
}

+2 −2
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ namespace android::hardware::gnss::common {
float gMockLatitudeDegrees{37.4219999};
float gMockLongitudeDegrees{-122.0840575};
float gMockAltitudeMeters{1.60062531};
float gMockBearingDegrees{0};
float gMockSpeedMetersPerSec{0};
float gMockBearingDegrees{0.0001};  // a real location rarely has exactly zero bearing
float gMockSpeedMetersPerSec{0.0001};

}  // namespace android::hardware::gnss::common