diff --git a/media/java/android/media/MediaRouter.java b/media/java/android/media/MediaRouter.java index 13c1498604ba7..7d57734defc55 100644 --- a/media/java/android/media/MediaRouter.java +++ b/media/java/android/media/MediaRouter.java @@ -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 + * AndroidX + * Media Router + * Library for consistent behavior across all devices. + * + *

MediaRouter allows applications to control the routing of media channels * and streams from the current device to external speakers and destination devices. * *

A MediaRouter is retrieved through {@link Context#getSystemService(String) * Context.getSystemService()} of a {@link Context#MEDIA_ROUTER_SERVICE * Context.MEDIA_ROUTER_SERVICE}. * - *

The media router API is not thread-safe; all interactions with it must be - * done from the main thread of the process.

- * - *

- * We recommend using {@link android.media.MediaRouter2} APIs for new applications. - *

+ *

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"; diff --git a/media/java/android/media/MediaRouter2.java b/media/java/android/media/MediaRouter2.java index b485eb51380d3..c97c841e6a96d 100644 --- a/media/java/android/media/MediaRouter2.java +++ b/media/java/android/media/MediaRouter2.java @@ -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 AndroidX - Media Router + * This API is not generally intended for third party application developers. Use the + * AndroidX + * Media Router * Library 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. + *

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.