summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Santiago Seifert <aquilescanta@google.com> 2025-02-17 17:03:26 +0000
committer Santiago Seifert <aquilescanta@google.com> 2025-02-19 12:23:29 +0000
commit3a8ab66c1c577243d65e3fdceb36b237402cdee2 (patch)
tree4040d955507fd5abfe0b7f7841e4600ef6c2fbd7
parentc594402aea11e28944ac329123c68ac467a03eb8 (diff)
Address API council feedback
Bug: b/396229325 Bug: b/362507305 Test: Presubmit (javadoc only) Flag: EXEMPT javadocs only Change-Id: I153795c4d935acb998a88919cadf10b5cf915632
-rw-r--r--media/java/android/media/MediaRoute2Info.java6
-rw-r--r--media/java/android/media/MediaRoute2ProviderService.java19
2 files changed, 14 insertions, 11 deletions
diff --git a/media/java/android/media/MediaRoute2Info.java b/media/java/android/media/MediaRoute2Info.java
index 88981eac9bb5..1cb540b09fb3 100644
--- a/media/java/android/media/MediaRoute2Info.java
+++ b/media/java/android/media/MediaRoute2Info.java
@@ -481,9 +481,9 @@ public final class MediaRoute2Info implements Parcelable {
/**
* Indicates that a route supports routing playback to remote routes through control commands.
*
- * <p>This type of routing does not affect affect this system's audio or video, but instead
- * relies on the device that corresponds to this route to fetch and play the media. It also
- * requires the media app to take care of initializing and controlling playback.
+ * <p>This type of routing does not affect this system's audio or video, but instead relies on
+ * the device that corresponds to this route to fetch and play the media. It also requires the
+ * media app to take care of initializing and controlling playback.
*/
@FlaggedApi(FLAG_ENABLE_MIRRORING_IN_MEDIA_ROUTER_2)
public static final int FLAG_ROUTING_TYPE_REMOTE = 1 << 2;
diff --git a/media/java/android/media/MediaRoute2ProviderService.java b/media/java/android/media/MediaRoute2ProviderService.java
index e94fb7d9e52b..4ae8daa63e1d 100644
--- a/media/java/android/media/MediaRoute2ProviderService.java
+++ b/media/java/android/media/MediaRoute2ProviderService.java
@@ -348,18 +348,21 @@ public abstract class MediaRoute2ProviderService extends Service {
* <p>This method must only be called as the result of a prior call to {@link
* #onCreateSystemRoutingSession}.
*
+ * <p>This method returns a {@link MediaStreams} instance that holds the media streams to route
+ * as part of the newly created routing session. May be null if system media capture failed, in
+ * which case you can ignore the return value, as you will receive a call to {@link
+ * #onReleaseSession} where you can clean up this session. {@link AudioRecord#startRecording()}
+ * must be called immediately on {@link MediaStreams#getAudioRecord()} after calling this
+ * method, in order to start streaming audio to the receiver.
+ *
* @param requestId the ID of the {@link #onCreateSystemRoutingSession} request which this call
* is in response to.
* @param sessionInfo a {@link RoutingSessionInfo} that describes the newly created routing
* session.
* @param formats the {@link MediaStreamsFormats} that describes the format for the {@link
* MediaStreams} to return.
- * @return a {@link MediaStreams} instance that holds the media streams to route as part of the
- * newly created routing session. May be null if system media capture failed, in which case
- * you can ignore the return value, as you will receive a call to {@link #onReleaseSession}
- * where you can clean up this session. {@link AudioRecord#startRecording()} must be called
- * immediately on {@link MediaStreams#getAudioRecord()} after calling this method, in order
- * to start streaming audio to the receiver.
+ * @return The {@link MediaStreams} to route as part of the new session, or null if system media
+ * capture failed and the result can be ignored.
* @throws IllegalStateException If the provided {@code requestId} doesn't correspond to a
* previous call to {@link #onCreateSystemRoutingSession}.
*/
@@ -1191,8 +1194,8 @@ public abstract class MediaRoute2ProviderService extends Service {
*
* <p>The default value is an empty {@link Bundle}.
*
- * <p>Note that this bundle is not copied, so avoiding mutating the given {@link Bundle}
- * after passing it to this method.
+ * <p>Do not mutate the given {@link Bundle} after passing it to this method. You can
+ * use {@link Bundle#deepCopy()} to keep a mutable copy.
*/
@NonNull
public Builder setExtras(@NonNull Bundle extras) {