Correct the range of issueOfDataEphemeris as [0, 1023]

Bug: 239083503

Test: atest SatellitePvtTest
Change-Id: I017b4e83a6af61c7827c9135176953809b139bb7
Merged-In: I017b4e83a6af61c7827c9135176953809b139bb7
(cherry picked from commit 70f5d083ce832841c1b646a8c8a82e73f5d2d481)
Merged-In: I017b4e83a6af61c7827c9135176953809b139bb7
This commit is contained in:
Yu-Han Yang 2022-07-13 00:11:13 +00:00 committed by Android Build Coastguard Worker
parent 745e31e1be
commit 86feb702da
2 changed files with 5 additions and 5 deletions

View File

@ -5956,7 +5956,7 @@ package android.location {
method public int getEphemerisSource(); method public int getEphemerisSource();
method @FloatRange public double getIonoDelayMeters(); method @FloatRange public double getIonoDelayMeters();
method @IntRange(from=0, to=1023) public int getIssueOfDataClock(); method @IntRange(from=0, to=1023) public int getIssueOfDataClock();
method @IntRange(from=0, to=255) public int getIssueOfDataEphemeris(); method @IntRange(from=0, to=1023) public int getIssueOfDataEphemeris();
method @Nullable public android.location.SatellitePvt.PositionEcef getPositionEcef(); method @Nullable public android.location.SatellitePvt.PositionEcef getPositionEcef();
method @IntRange(from=0) public long getTimeOfClockSeconds(); method @IntRange(from=0) public long getTimeOfClockSeconds();
method @IntRange(from=0) public long getTimeOfEphemerisSeconds(); method @IntRange(from=0) public long getTimeOfEphemerisSeconds();
@ -5984,7 +5984,7 @@ package android.location {
method @NonNull public android.location.SatellitePvt.Builder setEphemerisSource(int); method @NonNull public android.location.SatellitePvt.Builder setEphemerisSource(int);
method @NonNull public android.location.SatellitePvt.Builder setIonoDelayMeters(@FloatRange(from=0.0f, to=100.0f) double); method @NonNull public android.location.SatellitePvt.Builder setIonoDelayMeters(@FloatRange(from=0.0f, to=100.0f) double);
method @NonNull public android.location.SatellitePvt.Builder setIssueOfDataClock(@IntRange(from=0, to=1023) int); method @NonNull public android.location.SatellitePvt.Builder setIssueOfDataClock(@IntRange(from=0, to=1023) int);
method @NonNull public android.location.SatellitePvt.Builder setIssueOfDataEphemeris(@IntRange(from=0, to=255) int); method @NonNull public android.location.SatellitePvt.Builder setIssueOfDataEphemeris(@IntRange(from=0, to=1023) int);
method @NonNull public android.location.SatellitePvt.Builder setPositionEcef(@NonNull android.location.SatellitePvt.PositionEcef); method @NonNull public android.location.SatellitePvt.Builder setPositionEcef(@NonNull android.location.SatellitePvt.PositionEcef);
method @NonNull public android.location.SatellitePvt.Builder setTimeOfClockSeconds(@IntRange(from=0) long); method @NonNull public android.location.SatellitePvt.Builder setTimeOfClockSeconds(@IntRange(from=0) long);
method @NonNull public android.location.SatellitePvt.Builder setTimeOfEphemerisSeconds(@IntRange(from=0) long); method @NonNull public android.location.SatellitePvt.Builder setTimeOfEphemerisSeconds(@IntRange(from=0) long);

View File

@ -539,7 +539,7 @@ public final class SatellitePvt implements Parcelable {
* *
* <p>This field is valid if {@link #hasIssueOfDataEphemeris()} is true. * <p>This field is valid if {@link #hasIssueOfDataEphemeris()} is true.
*/ */
@IntRange(from = 0, to = 255) @IntRange(from = 0, to = 1023)
public int getIssueOfDataEphemeris() { public int getIssueOfDataEphemeris() {
return mIssueOfDataEphemeris; return mIssueOfDataEphemeris;
} }
@ -847,8 +847,8 @@ public final class SatellitePvt implements Parcelable {
*/ */
@NonNull @NonNull
public Builder setIssueOfDataEphemeris( public Builder setIssueOfDataEphemeris(
@IntRange(from = 0, to = 255) int issueOfDataEphemeris) { @IntRange(from = 0, to = 1023) int issueOfDataEphemeris) {
Preconditions.checkArgumentInRange(issueOfDataEphemeris, 0, 255, Preconditions.checkArgumentInRange(issueOfDataEphemeris, 0, 1023,
"issueOfDataEphemeris"); "issueOfDataEphemeris");
mIssueOfDataEphemeris = issueOfDataEphemeris; mIssueOfDataEphemeris = issueOfDataEphemeris;
mFlags = (byte) (mFlags | HAS_ISSUE_OF_DATA_EPHEMERIS); mFlags = (byte) (mFlags | HAS_ISSUE_OF_DATA_EPHEMERIS);