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

Commit 4b45f8da authored by Etan Cohen's avatar Etan Cohen
Browse files

[AWARE] Update docs for service discovery callbacks

Clarify that service discovery callbacks may be triggered multiple
times (and that therefore apps should deal correctly with it). These
may happen for several reasons (not documented since too low level):
- Peer went out-of-hearing-range and came back
- Peer went out of geofence range and came back
- Concurrency limitations caused discovery to switch from ranging-based
  to non-ranging-based or back

Bug: 77925576
Test: N/A
Change-Id: I9fbb909e5bd57fb714aa82bcfeb2834361722149
parent 04e1f8e6
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -95,6 +95,10 @@ public class DiscoverySessionCallback {
    /**
     * Called when a discovery (publish or subscribe) operation results in a
     * service discovery.
     * <p>
     * Note that this method and
     * {@link #onServiceDiscoveredWithinRange(PeerHandle, byte[], List, int)} may be called
     * multiple times per service discovery.
     *
     * @param peerHandle An opaque handle to the peer matching our discovery operation.
     * @param serviceSpecificInfo The service specific information (arbitrary
@@ -122,6 +126,9 @@ public class DiscoverySessionCallback {
     * 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.
     * <p>
     * Note that this method and {@link #onServiceDiscovered(PeerHandle, byte[], List)} may be
     * called multiple times per service discovery.
     *
     * @param peerHandle An opaque handle to the peer matching our discovery operation.
     * @param serviceSpecificInfo The service specific information (arbitrary