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

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

Merge "Add getters for default params." into main

parents 6d54b2bc 7abc42dc
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -23,6 +23,9 @@ import android.os.Parcelable;
/** @hide */
public final class RangingParams implements Parcelable {

    private static final double DEFAULT_THRESHOLD_METERS = 1.5;
    private static final int DEFAULT_TIMEOUT_MILLIS = 5000;

    private final double mThresholdMeters;
    private final int mTimeoutMillis;

@@ -31,6 +34,14 @@ public final class RangingParams implements Parcelable {
        this.mTimeoutMillis = timeoutMillis;
    }

    public double getDefaultThresholdMeters() {
        return DEFAULT_THRESHOLD_METERS;
    }

    public int getDefaultTimeoutMillis() {
        return DEFAULT_TIMEOUT_MILLIS;
    }

    public double getThresholdMeters() {
        return mThresholdMeters;
    }
@@ -78,8 +89,8 @@ public final class RangingParams implements Parcelable {
        private int mTimeoutMillis = 0;

        public Builder() {
            mThresholdMeters = 1.5;
            mTimeoutMillis = 5000;
            mThresholdMeters = DEFAULT_THRESHOLD_METERS;
            mTimeoutMillis = DEFAULT_TIMEOUT_MILLIS;
        }

        public Builder(@NonNull RangingParams src) {