diff options
| author | 2021-03-25 02:06:52 +0000 | |
|---|---|---|
| committer | 2021-03-25 02:06:52 +0000 | |
| commit | bef37a3dc8c9992fadbf2bcd4a42f85e79a7be88 (patch) | |
| tree | fb68b439acd97200e9d8e309b15a8f86526b6f30 | |
| parent | 565f1a95bdec38c3df0f2d0cabbf6875fd036f7b (diff) | |
| parent | 1bf9cb029ba0ca7d528d9128931f3e71eacfb23a (diff) | |
Merge "UWB: Annotate AngleMeasurement Parameters"
| -rw-r--r-- | core/api/system-current.txt | 2 | ||||
| -rw-r--r-- | core/java/android/uwb/AngleMeasurement.java | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 5df9708022e7..c1041b1fc49b 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -12440,7 +12440,7 @@ package android.util { package android.uwb { public final class AngleMeasurement implements android.os.Parcelable { - ctor public AngleMeasurement(double, double, double); + ctor public AngleMeasurement(@FloatRange(from=-3.141592653589793, to=3.141592653589793) double, @FloatRange(from=0.0, to=3.141592653589793) double, @FloatRange(from=0.0, to=1.0) double); method public int describeContents(); method @FloatRange(from=0.0, to=1.0) public double getConfidenceLevel(); method @FloatRange(from=0.0, to=3.141592653589793) public double getErrorRadians(); diff --git a/core/java/android/uwb/AngleMeasurement.java b/core/java/android/uwb/AngleMeasurement.java index 8c771baaea37..3d603737c48c 100644 --- a/core/java/android/uwb/AngleMeasurement.java +++ b/core/java/android/uwb/AngleMeasurement.java @@ -48,7 +48,10 @@ public final class AngleMeasurement implements Parcelable { * @throws IllegalArgumentException if the radians, errorRadians, or confidenceLevel is out of * allowed range */ - public AngleMeasurement(double radians, double errorRadians, double confidenceLevel) { + public AngleMeasurement( + @FloatRange(from = -Math.PI, to = +Math.PI) double radians, + @FloatRange(from = 0.0, to = +Math.PI) double errorRadians, + @FloatRange(from = 0.0, to = 1.0) double confidenceLevel) { if (radians < -Math.PI || radians > Math.PI) { throw new IllegalArgumentException("Invalid radians: " + radians); } |