Adjust Javadoc

PiperOrigin-RevId: 583965332
This commit is contained in:
tonihei 2023-11-20 02:52:43 -08:00 committed by Copybara-Service
parent ffbaa090aa
commit 5eb6a889a7
8 changed files with 15 additions and 7 deletions

View File

@ -29,6 +29,7 @@ import androidx.media3.common.util.Util;
import com.google.common.collect.ImmutableList;
import java.util.List;
// LINT.IfChange(javadoc)
/**
* A {@link Binder} to transfer a list of {@link Bundle Bundles} across processes by splitting the
* list into multiple transactions.
@ -40,7 +41,7 @@ import java.util.List;
*
* <pre>{@code
* // Sender
* List<Bundle> list = ...;
* ImmutableList<Bundle> list = ...;
* IBinder binder = new BundleListRetriever(list);
* Bundle bundle = new Bundle();
* bundle.putBinder("list", binder);
@ -48,7 +49,7 @@ import java.util.List;
* // Receiver
* Bundle bundle = ...; // Received from the sender
* IBinder binder = bundle.getBinder("list");
* List<Bundle> list = BundleListRetriever.getList(binder);
* ImmutableList<Bundle> list = BundleListRetriever.getList(binder);
* }</pre>
*/
@UnstableApi

View File

@ -2868,6 +2868,7 @@ public interface Player {
*/
TrackSelectionParameters getTrackSelectionParameters();
// LINT.IfChange(set_track_selection_parameters)
/**
* Sets the parameters constraining the track selection.
*

View File

@ -49,6 +49,7 @@ import java.util.Set;
import org.checkerframework.checker.initialization.qual.UnknownInitialization;
import org.checkerframework.checker.nullness.qual.EnsuresNonNull;
// LINT.IfChange(javadoc)
/**
* Parameters for controlling track selection.
*
@ -58,12 +59,12 @@ import org.checkerframework.checker.nullness.qual.EnsuresNonNull;
*
* <pre>{@code
* // Build on the current parameters.
* TrackSelectionParameters currentParameters = player.getTrackSelectionParameters()
* TrackSelectionParameters currentParameters = player.getTrackSelectionParameters();
* // Build the resulting parameters.
* TrackSelectionParameters newParameters = currentParameters
* .buildUpon()
* .setMaxVideoSizeSd()
* .setPreferredAudioLanguage("deu")
* .setPreferredAudioLanguage("de")
* .build();
* // Set the new parameters.
* player.setTrackSelectionParameters(newParameters);

View File

@ -87,6 +87,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
// LINT.IfChange(javadoc)
/**
* A default {@link TrackSelector} suitable for most use cases.
*

View File

@ -46,6 +46,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Executor;
// LINT.IfChange(javadoc)
/**
* A downloader for DASH streams.
*

View File

@ -35,6 +35,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.concurrent.Executor;
// LINT.IfChange(javadoc)
/**
* A downloader for HLS streams.
*

View File

@ -32,6 +32,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Executor;
// LINT.IfChange(javadoc)
/**
* A downloader for SmoothStreaming streams.
*

View File

@ -140,24 +140,25 @@ public final class MediaBrowser extends MediaController {
return this;
}
// LINT.IfChange(build_async)
/**
* Builds a {@link MediaBrowser} asynchronously.
*
* <p>The browser instance can be obtained like the following example:
*
* <pre>{@code
* MediaBrowser.Builder builder = ...;
* MediaBrowser.Builder builder = new MediaBrowser.Builder(context, sessionToken);
* ListenableFuture<MediaBrowser> future = builder.buildAsync();
* future.addListener(() -> {
* try {
* MediaBrowser browser = future.get();
* // The session accepted the connection.
* } catch (ExecutionException e) {
* } catch (ExecutionException | InterruptedException e) {
* if (e.getCause() instanceof SecurityException) {
* // The session rejected the connection.
* }
* }
* }, ContextCompat.getMainExecutor());
* }, ContextCompat.getMainExecutor(context));
* }</pre>
*
* <p>The future must be kept by callers until the future is complete to get the controller