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

Commit caf222f8 authored by Etan Cohen's avatar Etan Cohen Committed by Android (Google) Code Review
Browse files

Merge "[AWARE] Update documentation to reflect Aware+Ranging best effort"

parents 8c1bed2a 8c4c5bf2
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -116,9 +116,12 @@ public class DiscoverySessionCallback {
     * Called when a discovery (publish or subscribe) operation results in a
     * service discovery. Called when a Subscribe service was configured with a range requirement
     * {@link SubscribeConfig.Builder#setMinDistanceMm(int)} and/or
     * {@link SubscribeConfig.Builder#setMaxDistanceMm(int)}. A discovery will only be declared
     * (i.e. this callback called) if the range of the publisher is within the specified distance
     * constraints.
     * {@link SubscribeConfig.Builder#setMaxDistanceMm(int)} and the Publish service was configured
     * with {@link PublishConfig.Builder#setRangingEnabled(boolean)}.
     * <p>
     * If either Publisher or Subscriber does not enable Ranging, or if Ranging is temporarily
     * disabled by the underlying device, service discovery proceeds without ranging and the
     * {@link #onServiceDiscovered(PeerHandle, byte[], List)} is called.
     *
     * @param peerHandle An opaque handle to the peer matching our discovery operation.
     * @param serviceSpecificInfo The service specific information (arbitrary
+2 −3
Original line number Diff line number Diff line
@@ -365,9 +365,8 @@ public final class PublishConfig implements Parcelable {
         * {@link SubscribeConfig.Builder#setMaxDistanceMm(int)} to specify a minimum and/or
         * maximum distance at which discovery will be triggered.
         * <p>
         * Optional. Disabled by default - i.e. any peer which attempts to measure distance to this
         * device will be refused. If the peer has ranging enabled (using the
         * {@link SubscribeConfig} APIs listed above, it will never discover this device.
         * Optional. Disabled by default - i.e. any peer attempt to measure distance to this device
         * will be refused and discovery will proceed without ranging constraints.
         * <p>
         * The device must support Wi-Fi RTT for this feature to be used. Feature support is checked
         * as described in {@link android.net.wifi.rtt}.
+28 −16
Original line number Diff line number Diff line
@@ -415,17 +415,23 @@ public final class SubscribeConfig implements Parcelable {

        /**
         * Configure the minimum distance to a discovered publisher at which to trigger a discovery
         * notification. I.e. discovery will only be triggered if we've found a matching publisher
         * notification. I.e. discovery will be triggered if we've found a matching publisher
         * (based on the other criteria in this configuration) <b>and</b> the distance to the
         * publisher is > the value specified in this API.
         * publisher is larger than the value specified in this API. Can be used in conjunction with
         * {@link #setMaxDistanceMm(int)} to specify a geofence, i.e. discovery with min <
         * distance < max.
         * <p>
         * Can be used in conjunction with {@link #setMaxDistanceMm(int)} to specify a geo-fence,
         * i.e. discovery with min < distance < max.
         * For ranging to be used in discovery it must also be enabled on the publisher using
         * {@link PublishConfig.Builder#setRangingEnabled(boolean)}. However, ranging may
         * not be available or enabled on the publisher or may be temporarily disabled on either
         * subscriber or publisher - in such cases discovery will proceed without ranging.
         * <p>
         * If this API is called, the subscriber requires ranging. In such a case, the publisher
         * peer must enable ranging using
         * {@link PublishConfig.Builder#setRangingEnabled(boolean)}. Otherwise discovery will
         * never be triggered.
         * When ranging is enabled and available on both publisher and subscriber and a service
         * is discovered based on geofence constraints the
         * {@link DiscoverySessionCallback#onServiceDiscoveredWithinRange(PeerHandle, byte[], List, int)}
         * is called, otherwise the
         * {@link DiscoverySessionCallback#onServiceDiscovered(PeerHandle, byte[], List)}
         * is called.
         * <p>
         * The device must support Wi-Fi RTT for this feature to be used. Feature support is checked
         * as described in {@link android.net.wifi.rtt}.
@@ -444,17 +450,23 @@ public final class SubscribeConfig implements Parcelable {

        /**
         * Configure the maximum distance to a discovered publisher at which to trigger a discovery
         * notification. I.e. discovery will only be triggered if we've found a matching publisher
         * notification. I.e. discovery will be triggered if we've found a matching publisher
         * (based on the other criteria in this configuration) <b>and</b> the distance to the
         * publisher is < the value specified in this API.
         * publisher is smaller than the value specified in this API. Can be used in conjunction
         * with {@link #setMinDistanceMm(int)} to specify a geofence, i.e. discovery with min <
         * distance < max.
         * <p>
         * Can be used in conjunction with {@link #setMinDistanceMm(int)} to specify a geo-fence,
         * i.e. discovery with min < distance < max.
         * For ranging to be used in discovery it must also be enabled on the publisher using
         * {@link PublishConfig.Builder#setRangingEnabled(boolean)}. However, ranging may
         * not be available or enabled on the publisher or may be temporarily disabled on either
         * subscriber or publisher - in such cases discovery will proceed without ranging.
         * <p>
         * If this API is called, the subscriber requires ranging. In such a case, the publisher
         * peer must enable ranging using
         * {@link PublishConfig.Builder#setRangingEnabled(boolean)}. Otherwise discovery will
         * never be triggered.
         * When ranging is enabled and available on both publisher and subscriber and a service
         * is discovered based on geofence constraints the
         * {@link DiscoverySessionCallback#onServiceDiscoveredWithinRange(PeerHandle, byte[], List, int)}
         * is called, otherwise the
         * {@link DiscoverySessionCallback#onServiceDiscovered(PeerHandle, byte[], List)}
         * is called.
         * <p>
         * The device must support Wi-Fi RTT for this feature to be used. Feature support is checked
         * as described in {@link android.net.wifi.rtt}.