summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2018-02-09 05:41:26 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2018-02-09 05:41:26 +0000
commite4cf2564c6e5d9ca03fa14926fde7b2b7aae03f8 (patch)
treed259a65b5796fdc82a0ac8ff63da34d09c3416ad
parente5ffb6aabef40161ec1eb831ff2541ebb39d9c6a (diff)
parent1f974c4638f6bc7c45acedfa024b710bc1cc805a (diff)
Merge "[RTT][AWARE] Update documentation for direct ranging to an Aware peer"
-rw-r--r--wifi/java/android/net/wifi/rtt/RangingRequest.java22
1 files changed, 15 insertions, 7 deletions
diff --git a/wifi/java/android/net/wifi/rtt/RangingRequest.java b/wifi/java/android/net/wifi/rtt/RangingRequest.java
index 32f21b9cbc79..52b3d8691c79 100644
--- a/wifi/java/android/net/wifi/rtt/RangingRequest.java
+++ b/wifi/java/android/net/wifi/rtt/RangingRequest.java
@@ -156,14 +156,18 @@ public final class RangingRequest implements Parcelable {
/**
* Add the device specified by the {@code peerMacAddress} to the list of devices with
* which to measure range.
- *
+ * <p>
* The MAC address may be obtained out-of-band from a peer Wi-Fi Aware device. A Wi-Fi
* Aware device may obtain its MAC address using the {@link IdentityChangedListener}
* provided to
* {@link WifiAwareManager#attach(AttachCallback, IdentityChangedListener, Handler)}.
- *
- * * Note: in order to use this API the device must support Wi-Fi Aware
- * {@link android.net.wifi.aware}.
+ * <p>
+ * Note: in order to use this API the device must support Wi-Fi Aware
+ * {@link android.net.wifi.aware}. The peer device which is being ranged to must be
+ * configured to publish a service (with any name) with:
+ * <li>Type {@link android.net.wifi.aware.PublishConfig#PUBLISH_TYPE_UNSOLICITED}.
+ * <li>Ranging enabled
+ * {@link android.net.wifi.aware.PublishConfig.Builder#setRangingEnabled(boolean)}.
*
* @param peerMacAddress The MAC address of the Wi-Fi Aware peer.
* @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
@@ -179,12 +183,16 @@ public final class RangingRequest implements Parcelable {
/**
* Add a device specified by a {@link PeerHandle} to the list of devices with which to
* measure range.
- *
+ * <p>
* The {@link PeerHandle} may be obtained as part of the Wi-Fi Aware discovery process. E.g.
* using {@link DiscoverySessionCallback#onServiceDiscovered(PeerHandle, byte[], List)}.
- *
+ * <p>
* Note: in order to use this API the device must support Wi-Fi Aware
- * {@link android.net.wifi.aware}.
+ * {@link android.net.wifi.aware}. The peer device which is being ranged to must be
+ * configured to publish a service (with any name) with:
+ * <li>Type {@link android.net.wifi.aware.PublishConfig#PUBLISH_TYPE_UNSOLICITED}.
+ * <li>Ranging enabled
+ * {@link android.net.wifi.aware.PublishConfig.Builder#setRangingEnabled(boolean)}.
*
* @param peerHandle The peer handler of the peer Wi-Fi Aware device.
* @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.