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

Commit 46668c2a authored by Iván Budnik's avatar Iván Budnik Committed by Android (Google) Code Review
Browse files

Merge "Improve registerRouteCallback() javadoc" into main

parents 906e8c08 e48390ca
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,