Adjust Javadoc
PiperOrigin-RevId: 583965332
This commit is contained in:
parent
ffbaa090aa
commit
5eb6a889a7
@ -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
|
||||
|
@ -2868,6 +2868,7 @@ public interface Player {
|
||||
*/
|
||||
TrackSelectionParameters getTrackSelectionParameters();
|
||||
|
||||
// LINT.IfChange(set_track_selection_parameters)
|
||||
/**
|
||||
* Sets the parameters constraining the track selection.
|
||||
*
|
||||
|
@ -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);
|
||||
|
@ -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.
|
||||
*
|
||||
|
@ -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.
|
||||
*
|
||||
|
@ -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.
|
||||
*
|
||||
|
@ -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.
|
||||
*
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user