Improve MediaRouter Javadoc
The MediaRouter Javadoc currently advises developers to use MediaRouter2. The MediaRouter2 Javadoc further advises developers to use AndroidX MediaRouter. This change directs develeopers directly from MediaRouter to AndroidX. Test: Javadoc only Change-Id: Ia90e2e2799cc167f87349f907ae9621443d57bb3
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user