Merge "Improve MediaRouter Javadoc"

This commit is contained in:
Oliver Woodman
2022-02-09 17:11:47 +00:00
committed by Android (Google) Code Review
2 changed files with 13 additions and 13 deletions

View File

@@ -60,21 +60,21 @@ import java.util.Objects;
import java.util.concurrent.CopyOnWriteArrayList;
/**
* MediaRouter allows applications to control the routing of media channels
* This API is not recommended for new applications. Use the
* <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
* <a href="{@docRoot}reference/androidx/mediarouter/media/package-summary.html">Media Router
* Library</a> for consistent behavior across all devices.
*
* <p>MediaRouter allows applications to control the routing of media channels
* and streams from the current device to external speakers and destination devices.
*
* <p>A MediaRouter is retrieved through {@link Context#getSystemService(String)
* Context.getSystemService()} of a {@link Context#MEDIA_ROUTER_SERVICE
* Context.MEDIA_ROUTER_SERVICE}.
*
* <p>The media router API is not thread-safe; all interactions with it must be
* done from the main thread of the process.</p>
*
* <p>
* We recommend using {@link android.media.MediaRouter2} APIs for new applications.
* </p>
* <p>This API is not thread-safe; all interactions with it must be done from the main thread of the
* process.
*/
//TODO: Link androidx.media2.MediaRouter when we are ready.
@SystemService(Context.MEDIA_ROUTER_SERVICE)
public class MediaRouter {
private static final String TAG = "MediaRouter";

View File

@@ -52,13 +52,13 @@ import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
/**
* This API is not generally intended for third party application developers.
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
<a href="{@docRoot}reference/androidx/mediarouter/media/package-summary.html">Media Router
* This API is not generally intended for third party application developers. Use the
* <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
* <a href="{@docRoot}reference/androidx/mediarouter/media/package-summary.html">Media Router
* Library</a> for consistent behavior across all devices.
*
* Media Router 2 allows applications to control the routing of media channels
* and streams from the current device to remote speakers and devices.
* <p>MediaRouter2 allows applications to control the routing of media channels and streams from
* the current device to remote speakers and devices.
*/
// TODO(b/157873330): Add method names at the beginning of log messages. (e.g. selectRoute)
// Not only MediaRouter2, but also to service / manager / provider.