Loading core/api/system-current.txt +3 −3 Original line number Diff line number Diff line Loading @@ -12499,7 +12499,7 @@ package android.uwb { public final class DistanceMeasurement implements android.os.Parcelable { method public int describeContents(); method @FloatRange(from=0.0, to=1.0) public double getConfidenceLevel(); method public double getErrorMeters(); method @FloatRange(from=0.0) public double getErrorMeters(); method public double getMeters(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.uwb.DistanceMeasurement> CREATOR; Loading @@ -12508,8 +12508,8 @@ package android.uwb { public static final class DistanceMeasurement.Builder { ctor public DistanceMeasurement.Builder(); method @NonNull public android.uwb.DistanceMeasurement build(); method @NonNull public android.uwb.DistanceMeasurement.Builder setConfidenceLevel(double); method @NonNull public android.uwb.DistanceMeasurement.Builder setErrorMeters(double); method @NonNull public android.uwb.DistanceMeasurement.Builder setConfidenceLevel(@FloatRange(from=0.0, to=1.0) double); method @NonNull public android.uwb.DistanceMeasurement.Builder setErrorMeters(@FloatRange(from=0.0) double); method @NonNull public android.uwb.DistanceMeasurement.Builder setMeters(double); } core/java/android/uwb/DistanceMeasurement.java +4 −2 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ public final class DistanceMeasurement implements Parcelable { * * @return error of distance measurement in meters */ @FloatRange(from = 0.0) public double getErrorMeters() { return mErrorMeters; } Loading Loading @@ -162,7 +163,7 @@ public final class DistanceMeasurement implements Parcelable { * @throws IllegalArgumentException if error is negative or NaN */ @NonNull public Builder setErrorMeters(double errorMeters) { public Builder setErrorMeters(@FloatRange(from = 0.0) double errorMeters) { if (Double.isNaN(errorMeters) || errorMeters < 0.0) { throw new IllegalArgumentException( "errorMeters must be >= 0.0 and not NaN: " + errorMeters); Loading @@ -178,7 +179,8 @@ public final class DistanceMeasurement implements Parcelable { * @throws IllegalArgumentException if confidence level is not in the range of [0.0, 1.0] */ @NonNull public Builder setConfidenceLevel(double confidenceLevel) { public Builder setConfidenceLevel( @FloatRange(from = 0.0, to = 1.0) double confidenceLevel) { if (confidenceLevel < 0.0 || confidenceLevel > 1.0) { throw new IllegalArgumentException( "confidenceLevel must be in the range [0.0, 1.0]: " + confidenceLevel); Loading Loading
core/api/system-current.txt +3 −3 Original line number Diff line number Diff line Loading @@ -12499,7 +12499,7 @@ package android.uwb { public final class DistanceMeasurement implements android.os.Parcelable { method public int describeContents(); method @FloatRange(from=0.0, to=1.0) public double getConfidenceLevel(); method public double getErrorMeters(); method @FloatRange(from=0.0) public double getErrorMeters(); method public double getMeters(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.uwb.DistanceMeasurement> CREATOR; Loading @@ -12508,8 +12508,8 @@ package android.uwb { public static final class DistanceMeasurement.Builder { ctor public DistanceMeasurement.Builder(); method @NonNull public android.uwb.DistanceMeasurement build(); method @NonNull public android.uwb.DistanceMeasurement.Builder setConfidenceLevel(double); method @NonNull public android.uwb.DistanceMeasurement.Builder setErrorMeters(double); method @NonNull public android.uwb.DistanceMeasurement.Builder setConfidenceLevel(@FloatRange(from=0.0, to=1.0) double); method @NonNull public android.uwb.DistanceMeasurement.Builder setErrorMeters(@FloatRange(from=0.0) double); method @NonNull public android.uwb.DistanceMeasurement.Builder setMeters(double); }
core/java/android/uwb/DistanceMeasurement.java +4 −2 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ public final class DistanceMeasurement implements Parcelable { * * @return error of distance measurement in meters */ @FloatRange(from = 0.0) public double getErrorMeters() { return mErrorMeters; } Loading Loading @@ -162,7 +163,7 @@ public final class DistanceMeasurement implements Parcelable { * @throws IllegalArgumentException if error is negative or NaN */ @NonNull public Builder setErrorMeters(double errorMeters) { public Builder setErrorMeters(@FloatRange(from = 0.0) double errorMeters) { if (Double.isNaN(errorMeters) || errorMeters < 0.0) { throw new IllegalArgumentException( "errorMeters must be >= 0.0 and not NaN: " + errorMeters); Loading @@ -178,7 +179,8 @@ public final class DistanceMeasurement implements Parcelable { * @throws IllegalArgumentException if confidence level is not in the range of [0.0, 1.0] */ @NonNull public Builder setConfidenceLevel(double confidenceLevel) { public Builder setConfidenceLevel( @FloatRange(from = 0.0, to = 1.0) double confidenceLevel) { if (confidenceLevel < 0.0 || confidenceLevel > 1.0) { throw new IllegalArgumentException( "confidenceLevel must be in the range [0.0, 1.0]: " + confidenceLevel); Loading