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

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

Merge "Fix GlonassAlmanac frequency channel range." into main

parents 245ee00d a83d5390
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -313,7 +313,7 @@ package android.location {
    method @FloatRange(from=-3600.0F, to=3600.0f) public double getDeltaT();
    method @FloatRange(from=-0.004F, to=0.004f) public double getDeltaTDot();
    method @FloatRange(from=0.0f, to=0.03f) public double getEccentricity();
    method @IntRange(from=0, to=31) public int getFrequencyChannelNumber();
    method @IntRange(from=0xfffffff9, to=6) public int getFrequencyChannelNumber();
    method public int getHealthState();
    method @FloatRange(from=-1.0F, to=1.0f) public double getLambda();
    method @FloatRange(from=-1.0F, to=1.0f) public double getOmega();
@@ -333,7 +333,7 @@ package android.location {
    method @NonNull public android.location.GlonassAlmanac.GlonassSatelliteAlmanac.Builder setDeltaT(@FloatRange(from=-3600.0F, to=3600.0f) double);
    method @NonNull public android.location.GlonassAlmanac.GlonassSatelliteAlmanac.Builder setDeltaTDot(@FloatRange(from=-0.004F, to=0.004f) double);
    method @NonNull public android.location.GlonassAlmanac.GlonassSatelliteAlmanac.Builder setEccentricity(@FloatRange(from=0.0f, to=0.03f) double);
    method @NonNull public android.location.GlonassAlmanac.GlonassSatelliteAlmanac.Builder setFrequencyChannelNumber(@IntRange(from=0, to=31) int);
    method @NonNull public android.location.GlonassAlmanac.GlonassSatelliteAlmanac.Builder setFrequencyChannelNumber(@IntRange(from=0xfffffff9, to=6) int);
    method @NonNull public android.location.GlonassAlmanac.GlonassSatelliteAlmanac.Builder setGlonassM(boolean);
    method @NonNull public android.location.GlonassAlmanac.GlonassSatelliteAlmanac.Builder setHealthState(int);
    method @NonNull public android.location.GlonassAlmanac.GlonassSatelliteAlmanac.Builder setLambda(@FloatRange(from=-1.0F, to=1.0f) double);
+12 −7
Original line number Diff line number Diff line
@@ -131,7 +131,7 @@ public final class GlonassAlmanac implements Parcelable {
        /** Calendar day number within the four-year period beginning since the leap year. */
        private final int mCalendarDayNumber;

        /** Flag to indicates if the satellite is a GLONASS-M satellitee. */
        /** Flag to indicates if the satellite is a GLONASS-M satellite. */
        private final boolean mGlonassM;

        /** Coarse value of satellite time correction to GLONASS time in seconds. */
@@ -163,8 +163,13 @@ public final class GlonassAlmanac implements Parcelable {
            Preconditions.checkArgument(builder.mSlotNumber >= 1);
            // Allow healthState beyond the range to support potential future extensibility.
            Preconditions.checkArgument(builder.mHealthState >= 0);
            if (Flags.fixGlonassAlmanacFrequencyChannelRange()) {
                Preconditions.checkArgumentInRange(
                        builder.mFrequencyChannelNumber, -7, 6, "FrequencyChannelNumber");
            } else {
                Preconditions.checkArgumentInRange(
                        builder.mFrequencyChannelNumber, 0, 31, "FrequencyChannelNumber");
            }
            Preconditions.checkArgumentInRange(
                    builder.mCalendarDayNumber, 1, 1461, "CalendarDayNumber");
            Preconditions.checkArgumentInRange(builder.mTau, -1.9e-3f, 1.9e-3f, "Tau");
@@ -202,7 +207,7 @@ public final class GlonassAlmanac implements Parcelable {
        }

        /** Returns the frequency channel number. */
        @IntRange(from = 0, to = 31)
        @IntRange(from = -7, to = 6)
        public int getFrequencyChannelNumber() {
            return mFrequencyChannelNumber;
        }
@@ -216,7 +221,7 @@ public final class GlonassAlmanac implements Parcelable {
            return mCalendarDayNumber;
        }

        /** Returns true if the satellite is a GLONASS-M satellitee, false otherwise. */
        /** Returns true if the satellite is a GLONASS-M satellite, false otherwise. */
        public boolean isGlonassM() {
            return mGlonassM;
        }
@@ -375,7 +380,7 @@ public final class GlonassAlmanac implements Parcelable {
            /** Sets the frequency channel number. */
            @NonNull
            public Builder setFrequencyChannelNumber(
                    @IntRange(from = 0, to = 31) int frequencyChannelNumber) {
                    @IntRange(from = -7, to = 6) int frequencyChannelNumber) {
                mFrequencyChannelNumber = frequencyChannelNumber;
                return this;
            }
@@ -391,7 +396,7 @@ public final class GlonassAlmanac implements Parcelable {
                return this;
            }

            /** Sets to true if the satellite is a GLONASS-M satellitee, false otherwise. */
            /** Sets to true if the satellite is a GLONASS-M satellite, false otherwise. */
            @NonNull
            public Builder setGlonassM(boolean isGlonassM) {
                this.mGlonassM = isGlonassM;
+11 −1
Original line number Diff line number Diff line
@@ -212,3 +212,13 @@ flag {
    bug: "362287534"
    is_exported: true
}

flag {
    name: "fix_glonass_almanac_frequency_channel_range"
    namespace: "location"
    description: "Fix GLONASS almanac frequency channel range"
    bug: "428050932"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}