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

Commit e48390ca authored by Iván Budnik's avatar Iván Budnik
Browse files

Improve registerRouteCallback() javadoc

This should address some frequently asked questions.

Bug: 321173822
Test: N/A.
Flag: DOCS_ONLY
Change-Id: Id69a0ee575c8d0a29ed0e2d9e0064da1ac42a6de
parent 55b43834
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -681,8 +681,19 @@ public final class MediaRouter2 {
    /**
     * Registers a callback to discover routes and to receive events when they change.
     *
     * <p>Clients can register multiple callbacks, as long as the {@link RouteCallback} instances
     * are different. Each callback can provide a unique {@link RouteDiscoveryPreference preference}
     * and will only receive updates related to that set preference.
     *
     * <p>If the specified callback is already registered, its registration will be updated for the
     * given {@link Executor executor} and {@link RouteDiscoveryPreference discovery preference}.
     *
     * <p>{@link #getInstance(Context) Local routers} must register a route callback to register in
     * the system and start receiving updates. Otherwise, all operations will be no-ops.
     *
     * <p>Any discovery preference passed by a {@link #getInstance(Context, String) proxy router}
     * will be ignored and will receive route updates based on the preference set by its matching
     * local router.
     */
    public void registerRouteCallback(
            @NonNull @CallbackExecutor Executor executor,