Loading core/java/android/proximity/IProximityProviderService.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ interface IProximityProviderService { /** * Finds nearby watch paired to this phone. If the watch is not found within the * specified timeout, the callback is called with result set to NO_RANGING_RESULT. * If timeout is 0, it will use a default timeout of 5 seconds. Returns an integer * If timeout is <= 0, it will use a default timeout of 5 seconds. Returns an integer * handle identifying the ranging session. */ ICancellationSignal anyWatchNearby( Loading core/java/android/proximity/ProximityResultCode.aidl +3 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.proximity; /** @hide */ @Backing(type="int") enum ProximityResultCode { /** Indicates a successful operation. */ SUCCESS = 0, Loading Loading @@ -54,6 +55,6 @@ enum ProximityResultCode { ASSOCIATED_DEVICE_RANGING_ALREADY_RUNNING = 15, /** User turned off ranging method on associated device. */ ASSOCIATED_DEVICE_RANGING_TURNED_OFF = 16, /** The primary device Bluetooth adapter is turned off by the user. */ ASSOCIATED_DEVICE_BT_ADAPTER_OFF = 17, /** Request contains invalid parameters. */ INVALID_PARAMETERS = 17, } core/java/android/proximity/RangingParams.java +13 −0 Original line number Diff line number Diff line Loading @@ -77,16 +77,29 @@ public final class RangingParams implements Parcelable { private double mThresholdMeters = 0.0; private int mTimeoutMillis = 0; public Builder() { mThresholdMeters = 1.5; mTimeoutMillis = 5000; } public Builder(@NonNull RangingParams src) { mThresholdMeters = src.mThresholdMeters; mTimeoutMillis = src.mTimeoutMillis; } /** * Sets the threshold in meters for ranging. If not set or set to <= 0.0 , a default value * of 1.5 meters is used. */ public @NonNull Builder setThresholdMeters(double thresholdMeters) { mThresholdMeters = thresholdMeters; return this; } /** * Sets the timeout in milliseconds for ranging request. If not set or set to <= 0, a * default value of 5000 milliseconds is used. */ public @NonNull Builder setTimeoutMillis(int timeoutMillis) { mTimeoutMillis = timeoutMillis; return this; Loading Loading
core/java/android/proximity/IProximityProviderService.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ interface IProximityProviderService { /** * Finds nearby watch paired to this phone. If the watch is not found within the * specified timeout, the callback is called with result set to NO_RANGING_RESULT. * If timeout is 0, it will use a default timeout of 5 seconds. Returns an integer * If timeout is <= 0, it will use a default timeout of 5 seconds. Returns an integer * handle identifying the ranging session. */ ICancellationSignal anyWatchNearby( Loading
core/java/android/proximity/ProximityResultCode.aidl +3 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.proximity; /** @hide */ @Backing(type="int") enum ProximityResultCode { /** Indicates a successful operation. */ SUCCESS = 0, Loading Loading @@ -54,6 +55,6 @@ enum ProximityResultCode { ASSOCIATED_DEVICE_RANGING_ALREADY_RUNNING = 15, /** User turned off ranging method on associated device. */ ASSOCIATED_DEVICE_RANGING_TURNED_OFF = 16, /** The primary device Bluetooth adapter is turned off by the user. */ ASSOCIATED_DEVICE_BT_ADAPTER_OFF = 17, /** Request contains invalid parameters. */ INVALID_PARAMETERS = 17, }
core/java/android/proximity/RangingParams.java +13 −0 Original line number Diff line number Diff line Loading @@ -77,16 +77,29 @@ public final class RangingParams implements Parcelable { private double mThresholdMeters = 0.0; private int mTimeoutMillis = 0; public Builder() { mThresholdMeters = 1.5; mTimeoutMillis = 5000; } public Builder(@NonNull RangingParams src) { mThresholdMeters = src.mThresholdMeters; mTimeoutMillis = src.mTimeoutMillis; } /** * Sets the threshold in meters for ranging. If not set or set to <= 0.0 , a default value * of 1.5 meters is used. */ public @NonNull Builder setThresholdMeters(double thresholdMeters) { mThresholdMeters = thresholdMeters; return this; } /** * Sets the timeout in milliseconds for ranging request. If not set or set to <= 0, a * default value of 5000 milliseconds is used. */ public @NonNull Builder setTimeoutMillis(int timeoutMillis) { mTimeoutMillis = timeoutMillis; return this; Loading