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

Commit fe91a6d8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Align value range of set/get confidence level" into main

parents 78e6d90d 2f7b7fce
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1336,7 +1336,7 @@ package android.bluetooth.le {
    method @NonNull public android.bluetooth.le.DistanceMeasurementResult build();
    method @NonNull public android.bluetooth.le.DistanceMeasurementResult build();
    method @NonNull public android.bluetooth.le.DistanceMeasurementResult.Builder setAltitudeAngle(@FloatRange(from=-90.0, to=90.0) double);
    method @NonNull public android.bluetooth.le.DistanceMeasurementResult.Builder setAltitudeAngle(@FloatRange(from=-90.0, to=90.0) double);
    method @NonNull public android.bluetooth.le.DistanceMeasurementResult.Builder setAzimuthAngle(@FloatRange(from=0.0, to=360.0) double);
    method @NonNull public android.bluetooth.le.DistanceMeasurementResult.Builder setAzimuthAngle(@FloatRange(from=0.0, to=360.0) double);
    method @FlaggedApi("com.android.bluetooth.flags.channel_sounding") @NonNull public android.bluetooth.le.DistanceMeasurementResult.Builder setConfidenceLevel(@FloatRange(from=0.0, to=100.0) double);
    method @FlaggedApi("com.android.bluetooth.flags.channel_sounding") @NonNull public android.bluetooth.le.DistanceMeasurementResult.Builder setConfidenceLevel(@FloatRange(from=0.0, to=1.0) double);
    method @FlaggedApi("com.android.bluetooth.flags.channel_sounding") @NonNull public android.bluetooth.le.DistanceMeasurementResult.Builder setDelaySpreadMeters(double);
    method @FlaggedApi("com.android.bluetooth.flags.channel_sounding") @NonNull public android.bluetooth.le.DistanceMeasurementResult.Builder setDelaySpreadMeters(double);
    method @FlaggedApi("com.android.bluetooth.flags.channel_sounding") @NonNull public android.bluetooth.le.DistanceMeasurementResult.Builder setDetectedAttackLevel(int);
    method @FlaggedApi("com.android.bluetooth.flags.channel_sounding") @NonNull public android.bluetooth.le.DistanceMeasurementResult.Builder setDetectedAttackLevel(int);
    method @NonNull public android.bluetooth.le.DistanceMeasurementResult.Builder setErrorAltitudeAngle(@FloatRange(from=0.0, to=180.0) double);
    method @NonNull public android.bluetooth.le.DistanceMeasurementResult.Builder setErrorAltitudeAngle(@FloatRange(from=0.0, to=180.0) double);
+3 −3
Original line number Original line Diff line number Diff line
@@ -524,7 +524,7 @@ public final class DistanceMeasurementResult implements Parcelable {
        /**
        /**
         * Set the confidence of estimated distance.
         * Set the confidence of estimated distance.
         *
         *
         * @param confidenceLevel a normalized value from 0.0 (low confidence) to 100.0 (high
         * @param confidenceLevel a normalized value from 0.0 (low confidence) to 1.0 (high
         *     confidence) representing the confidence of estimated distance
         *     confidence) representing the confidence of estimated distance
         * @throws IllegalArgumentException if value is invalid
         * @throws IllegalArgumentException if value is invalid
         * @hide
         * @hide
@@ -533,8 +533,8 @@ public final class DistanceMeasurementResult implements Parcelable {
        @SystemApi
        @SystemApi
        @NonNull
        @NonNull
        public Builder setConfidenceLevel(
        public Builder setConfidenceLevel(
                @FloatRange(from = 0.0, to = 100.0) double confidenceLevel) {
                @FloatRange(from = 0.0, to = 1.0) double confidenceLevel) {
            if (confidenceLevel > 100.0 || confidenceLevel < 0.0) {
            if (confidenceLevel > 1.0 || confidenceLevel < 0.0) {
                throw new IllegalArgumentException(
                throw new IllegalArgumentException(
                        "error confidenceLevel must be in the range from 0.0 to 100.0 : "
                        "error confidenceLevel must be in the range from 0.0 to 100.0 : "
                                + confidenceLevel);
                                + confidenceLevel);