Update javadoc
This commit is contained in:
parent
28edfcbb69
commit
7406b78fbc
@ -455,8 +455,6 @@ public final class MediaBrowserCompat {
|
|||||||
* Creates an instance from a framework {@link android.media.browse.MediaBrowser.MediaItem}
|
* Creates an instance from a framework {@link android.media.browse.MediaBrowser.MediaItem}
|
||||||
* object.
|
* object.
|
||||||
*
|
*
|
||||||
* <p>This method is only supported on API 21+. On API 20 and below, it returns null.
|
|
||||||
*
|
|
||||||
* @param itemObj A {@link android.media.browse.MediaBrowser.MediaItem} object.
|
* @param itemObj A {@link android.media.browse.MediaBrowser.MediaItem} object.
|
||||||
* @return An equivalent {@link MediaItem} object, or null if none.
|
* @return An equivalent {@link MediaItem} object, or null if none.
|
||||||
*/
|
*/
|
||||||
@ -476,8 +474,6 @@ public final class MediaBrowserCompat {
|
|||||||
* Creates a list of {@link MediaItem} objects from a framework {@link
|
* Creates a list of {@link MediaItem} objects from a framework {@link
|
||||||
* android.media.browse.MediaBrowser.MediaItem} object list.
|
* android.media.browse.MediaBrowser.MediaItem} object list.
|
||||||
*
|
*
|
||||||
* <p>This method is only supported on API 21+. On API 20 and below, it returns null.
|
|
||||||
*
|
|
||||||
* @param itemList A list of {@link android.media.browse.MediaBrowser.MediaItem} objects.
|
* @param itemList A list of {@link android.media.browse.MediaBrowser.MediaItem} objects.
|
||||||
* @return An equivalent list of {@link MediaItem} objects, or null if none.
|
* @return An equivalent list of {@link MediaItem} objects, or null if none.
|
||||||
*/
|
*/
|
||||||
|
@ -642,8 +642,6 @@ public final class MediaControllerCompat {
|
|||||||
/**
|
/**
|
||||||
* Gets the underlying framework {@link android.media.session.MediaController} object.
|
* Gets the underlying framework {@link android.media.session.MediaController} object.
|
||||||
*
|
*
|
||||||
* <p>This method is only supported on API 21+.
|
|
||||||
*
|
|
||||||
* @return The underlying {@link android.media.session.MediaController} object, or null if none.
|
* @return The underlying {@link android.media.session.MediaController} object, or null if none.
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@ -346,8 +346,6 @@ public final class MediaDescriptionCompat implements Parcelable {
|
|||||||
/**
|
/**
|
||||||
* Creates an instance from a framework {@link android.media.MediaDescription} object.
|
* Creates an instance from a framework {@link android.media.MediaDescription} object.
|
||||||
*
|
*
|
||||||
* <p>This method is only supported on API 21+.
|
|
||||||
*
|
|
||||||
* @param descriptionObj A {@link android.media.MediaDescription} object, or null if none.
|
* @param descriptionObj A {@link android.media.MediaDescription} object, or null if none.
|
||||||
* @return An equivalent {@link MediaMetadataCompat} object, or null if none.
|
* @return An equivalent {@link MediaMetadataCompat} object, or null if none.
|
||||||
*/
|
*/
|
||||||
|
@ -555,8 +555,6 @@ public final class MediaMetadataCompat implements Parcelable {
|
|||||||
/**
|
/**
|
||||||
* Creates an instance from a framework {@link android.media.MediaMetadata} object.
|
* Creates an instance from a framework {@link android.media.MediaMetadata} object.
|
||||||
*
|
*
|
||||||
* <p>This method is only supported on {@link android.os.Build.VERSION_CODES#LOLLIPOP} and later.
|
|
||||||
*
|
|
||||||
* @param metadataObj A {@link android.media.MediaMetadata} object, or null if none.
|
* @param metadataObj A {@link android.media.MediaMetadata} object, or null if none.
|
||||||
* @return An equivalent {@link MediaMetadataCompat} object, or null if none.
|
* @return An equivalent {@link MediaMetadataCompat} object, or null if none.
|
||||||
*/
|
*/
|
||||||
|
@ -361,25 +361,19 @@ public class MediaSessionCompat {
|
|||||||
* <p>The session will automatically be registered with the system but will not be published until
|
* <p>The session will automatically be registered with the system but will not be published until
|
||||||
* {@link #setActive(boolean) setActive(true)} is called.
|
* {@link #setActive(boolean) setActive(true)} is called.
|
||||||
*
|
*
|
||||||
* <p>For API 20 or earlier, note that a media button receiver is required for handling {@link
|
|
||||||
* Intent#ACTION_MEDIA_BUTTON}. This constructor will attempt to find an appropriate {@link
|
|
||||||
* BroadcastReceiver} from your manifest if it's not specified. See {@link MediaButtonReceiver}
|
|
||||||
* for more details.
|
|
||||||
*
|
|
||||||
* @param context The context to use to create the session.
|
* @param context The context to use to create the session.
|
||||||
* @param tag A short name for debugging purposes.
|
* @param tag A short name for debugging purposes.
|
||||||
* @param mbrComponent The component name for your media button receiver.
|
* @param mbrComponent The component name for your media button receiver.
|
||||||
* @param mbrIntent The PendingIntent for your receiver component that handles media button
|
* @param mbrIntent The PendingIntent for your receiver component that handles media button
|
||||||
* events. This is optional and will be used on between {@link
|
* events. This is no longer used.
|
||||||
* android.os.Build.VERSION_CODES#JELLY_BEAN_MR2} and {@link
|
|
||||||
* android.os.Build.VERSION_CODES#KITKAT_WATCH} instead of the component name.
|
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public MediaSessionCompat(
|
public MediaSessionCompat(
|
||||||
Context context,
|
Context context,
|
||||||
String tag,
|
String tag,
|
||||||
@Nullable ComponentName mbrComponent,
|
@Nullable ComponentName mbrComponent,
|
||||||
@Nullable PendingIntent mbrIntent) {
|
@Nullable PendingIntent mbrIntent) {
|
||||||
this(context, tag, mbrComponent, mbrIntent, null);
|
this(context, tag, mbrComponent, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -389,10 +383,7 @@ public class MediaSessionCompat {
|
|||||||
* <p>The session will automatically be registered with the system but will not be published until
|
* <p>The session will automatically be registered with the system but will not be published until
|
||||||
* {@link #setActive(boolean) setActive(true)} is called.
|
* {@link #setActive(boolean) setActive(true)} is called.
|
||||||
*
|
*
|
||||||
* <p>For API 20 or earlier, note that a media button receiver is required for handling {@link
|
* <p>The {@code sessionInfo} can include additional unchanging information about
|
||||||
* Intent#ACTION_MEDIA_BUTTON}. This constructor will attempt to find an appropriate {@link
|
|
||||||
* BroadcastReceiver} from your manifest if it's not specified. See {@link MediaButtonReceiver}
|
|
||||||
* for more details. The {@code sessionInfo} can include additional unchanging information about
|
|
||||||
* this session. For example, it can include the version of the application, or other app-specific
|
* this session. For example, it can include the version of the application, or other app-specific
|
||||||
* unchanging information.
|
* unchanging information.
|
||||||
*
|
*
|
||||||
@ -400,21 +391,20 @@ public class MediaSessionCompat {
|
|||||||
* @param tag A short name for debugging purposes.
|
* @param tag A short name for debugging purposes.
|
||||||
* @param mbrComponent The component name for your media button receiver.
|
* @param mbrComponent The component name for your media button receiver.
|
||||||
* @param mbrIntent The PendingIntent for your receiver component that handles media button
|
* @param mbrIntent The PendingIntent for your receiver component that handles media button
|
||||||
* events. This is optional and will be used on between {@link
|
* events. This is no longer used
|
||||||
* android.os.Build.VERSION_CODES#JELLY_BEAN_MR2} and {@link
|
|
||||||
* android.os.Build.VERSION_CODES#KITKAT_WATCH} instead of the component name.
|
|
||||||
* @param sessionInfo A bundle for additional information about this session, or {@link
|
* @param sessionInfo A bundle for additional information about this session, or {@link
|
||||||
* Bundle#EMPTY} if none. Controllers can get this information by calling {@link
|
* Bundle#EMPTY} if none. Controllers can get this information by calling {@link
|
||||||
* MediaControllerCompat#getSessionInfo()}. An {@link IllegalArgumentException} will be thrown
|
* MediaControllerCompat#getSessionInfo()}. An {@link IllegalArgumentException} will be thrown
|
||||||
* if this contains any non-framework Parcelable objects.
|
* if this contains any non-framework Parcelable objects.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public MediaSessionCompat(
|
public MediaSessionCompat(
|
||||||
Context context,
|
Context context,
|
||||||
String tag,
|
String tag,
|
||||||
@Nullable ComponentName mbrComponent,
|
@Nullable ComponentName mbrComponent,
|
||||||
@Nullable PendingIntent mbrIntent,
|
@Nullable PendingIntent mbrIntent,
|
||||||
@Nullable Bundle sessionInfo) {
|
@Nullable Bundle sessionInfo) {
|
||||||
this(context, tag, mbrComponent, mbrIntent, sessionInfo, null /* session2Token */);
|
this(context, tag, mbrComponent, null, sessionInfo, null /* session2Token */);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
@ -554,9 +544,6 @@ public class MediaSessionCompat {
|
|||||||
* session has been stopped. If your app is started in this way an {@link
|
* session has been stopped. If your app is started in this way an {@link
|
||||||
* Intent#ACTION_MEDIA_BUTTON} intent will be sent via the pending intent.
|
* Intent#ACTION_MEDIA_BUTTON} intent will be sent via the pending intent.
|
||||||
*
|
*
|
||||||
* <p>This method will only work on {@link android.os.Build.VERSION_CODES#LOLLIPOP} and later.
|
|
||||||
* Earlier platform versions must include the media button receiver in the constructor.
|
|
||||||
*
|
|
||||||
* @param mbr The {@link PendingIntent} to send the media button event to.
|
* @param mbr The {@link PendingIntent} to send the media button event to.
|
||||||
*/
|
*/
|
||||||
public void setMediaButtonReceiver(PendingIntent mbr) {
|
public void setMediaButtonReceiver(PendingIntent mbr) {
|
||||||
@ -591,10 +578,6 @@ public class MediaSessionCompat {
|
|||||||
* {@link #setPlaybackToLocal} was previously called that stream will stop receiving volume
|
* {@link #setPlaybackToLocal} was previously called that stream will stop receiving volume
|
||||||
* changes for this session.
|
* changes for this session.
|
||||||
*
|
*
|
||||||
* <p>On platforms earlier than {@link android.os.Build.VERSION_CODES#LOLLIPOP} this will only
|
|
||||||
* allow an app to handle volume commands sent directly to the session by a {@link
|
|
||||||
* MediaControllerCompat}. System routing of volume keys will not use the volume provider.
|
|
||||||
*
|
|
||||||
* @param volumeProvider The provider that will handle volume changes. May not be null.
|
* @param volumeProvider The provider that will handle volume changes. May not be null.
|
||||||
*/
|
*/
|
||||||
public void setPlaybackToRemote(VolumeProviderCompat volumeProvider) {
|
public void setPlaybackToRemote(VolumeProviderCompat volumeProvider) {
|
||||||
@ -609,9 +592,6 @@ public class MediaSessionCompat {
|
|||||||
* session's controller may not be discoverable. You must set the session to active before it can
|
* session's controller may not be discoverable. You must set the session to active before it can
|
||||||
* start receiving media button events or transport commands.
|
* start receiving media button events or transport commands.
|
||||||
*
|
*
|
||||||
* <p>On platforms earlier than {@link android.os.Build.VERSION_CODES#LOLLIPOP}, a media button
|
|
||||||
* event receiver should be set via the constructor to receive media button events.
|
|
||||||
*
|
|
||||||
* @param active Whether this session is active or not.
|
* @param active Whether this session is active or not.
|
||||||
*/
|
*/
|
||||||
public void setActive(boolean active) {
|
public void setActive(boolean active) {
|
||||||
@ -658,10 +638,6 @@ public class MediaSessionCompat {
|
|||||||
* interacting with this session. The owner of the session is responsible for deciding how to
|
* interacting with this session. The owner of the session is responsible for deciding how to
|
||||||
* distribute these tokens.
|
* distribute these tokens.
|
||||||
*
|
*
|
||||||
* <p>On platform versions before {@link android.os.Build.VERSION_CODES#LOLLIPOP} this token may
|
|
||||||
* only be used within your app as there is no way to guarantee other apps are using the same
|
|
||||||
* version of the support library.
|
|
||||||
*
|
|
||||||
* @return A token that can be used to create a media controller for this session.
|
* @return A token that can be used to create a media controller for this session.
|
||||||
*/
|
*/
|
||||||
public Token getSessionToken() {
|
public Token getSessionToken() {
|
||||||
@ -807,8 +783,6 @@ public class MediaSessionCompat {
|
|||||||
/**
|
/**
|
||||||
* Gets the underlying framework {@link android.media.session.MediaSession} object.
|
* Gets the underlying framework {@link android.media.session.MediaSession} object.
|
||||||
*
|
*
|
||||||
* <p>This method is only supported on API 21+.
|
|
||||||
*
|
|
||||||
* @return The underlying {@link android.media.session.MediaSession} object, or null if none.
|
* @return The underlying {@link android.media.session.MediaSession} object, or null if none.
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
@ -819,12 +793,12 @@ public class MediaSessionCompat {
|
|||||||
/**
|
/**
|
||||||
* Gets the underlying framework {@link android.media.RemoteControlClient} object.
|
* Gets the underlying framework {@link android.media.RemoteControlClient} object.
|
||||||
*
|
*
|
||||||
* <p>This method is only supported on APIs 14-20. On API 21+ {@link #getMediaSession()} should be
|
|
||||||
* used instead.
|
|
||||||
*
|
|
||||||
* @return The underlying {@link android.media.RemoteControlClient} object, or null if none.
|
* @return The underlying {@link android.media.RemoteControlClient} object, or null if none.
|
||||||
|
*
|
||||||
|
* @deprecated Use {@link #getMediaSession()}
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@Deprecated
|
||||||
public Object getRemoteControlClient() {
|
public Object getRemoteControlClient() {
|
||||||
return mImpl.getRemoteControlClient();
|
return mImpl.getRemoteControlClient();
|
||||||
}
|
}
|
||||||
@ -892,8 +866,6 @@ public class MediaSessionCompat {
|
|||||||
/**
|
/**
|
||||||
* Creates an instance from a framework {@link android.media.session.MediaSession} object.
|
* Creates an instance from a framework {@link android.media.session.MediaSession} object.
|
||||||
*
|
*
|
||||||
* <p>This method is only supported on API 21+. On API 20 and below, it returns null.
|
|
||||||
*
|
|
||||||
* <p>Note: A {@link MediaSessionCompat} object returned from this method may not provide the full
|
* <p>Note: A {@link MediaSessionCompat} object returned from this method may not provide the full
|
||||||
* functionality of {@link MediaSessionCompat} until setting a new {@link
|
* functionality of {@link MediaSessionCompat} until setting a new {@link
|
||||||
* MediaSessionCompat.Callback}. To avoid this, when both a {@link MediaSessionCompat} and a
|
* MediaSessionCompat.Callback}. To avoid this, when both a {@link MediaSessionCompat} and a
|
||||||
@ -1868,8 +1840,6 @@ public class MediaSessionCompat {
|
|||||||
/**
|
/**
|
||||||
* Gets the underlying framework {@link android.media.session.MediaSession.Token} object.
|
* Gets the underlying framework {@link android.media.session.MediaSession.Token} object.
|
||||||
*
|
*
|
||||||
* <p>This method is only supported on API 21+.
|
|
||||||
*
|
|
||||||
* @return The underlying {@link android.media.session.MediaSession.Token} object, or null if
|
* @return The underlying {@link android.media.session.MediaSession.Token} object, or null if
|
||||||
* none.
|
* none.
|
||||||
*/
|
*/
|
||||||
|
@ -840,8 +840,6 @@ public final class PlaybackStateCompat implements Parcelable {
|
|||||||
/**
|
/**
|
||||||
* Creates an instance from a framework {@link android.media.session.PlaybackState} object.
|
* Creates an instance from a framework {@link android.media.session.PlaybackState} object.
|
||||||
*
|
*
|
||||||
* <p>This method is only supported on API 21+.
|
|
||||||
*
|
|
||||||
* @param stateObj A {@link android.media.session.PlaybackState} object, or null if none.
|
* @param stateObj A {@link android.media.session.PlaybackState} object, or null if none.
|
||||||
* @return An equivalent {@link PlaybackStateCompat} object, or null if none.
|
* @return An equivalent {@link PlaybackStateCompat} object, or null if none.
|
||||||
*/
|
*/
|
||||||
@ -890,8 +888,6 @@ public final class PlaybackStateCompat implements Parcelable {
|
|||||||
/**
|
/**
|
||||||
* Gets the underlying framework {@link android.media.session.PlaybackState} object.
|
* Gets the underlying framework {@link android.media.session.PlaybackState} object.
|
||||||
*
|
*
|
||||||
* <p>This method is only supported on API 21+.
|
|
||||||
*
|
|
||||||
* @return An equivalent {@link android.media.session.PlaybackState} object, or null if none.
|
* @return An equivalent {@link android.media.session.PlaybackState} object, or null if none.
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@ -323,8 +323,6 @@ public final class RatingCompat implements Parcelable {
|
|||||||
/**
|
/**
|
||||||
* Creates an instance from a framework {@link android.media.Rating} object.
|
* Creates an instance from a framework {@link android.media.Rating} object.
|
||||||
*
|
*
|
||||||
* <p>This method is only supported on API 19+.
|
|
||||||
*
|
|
||||||
* @param ratingObj A {@link android.media.Rating} object, or null if none.
|
* @param ratingObj A {@link android.media.Rating} object, or null if none.
|
||||||
* @return An equivalent {@link RatingCompat} object, or null if none.
|
* @return An equivalent {@link RatingCompat} object, or null if none.
|
||||||
*/
|
*/
|
||||||
@ -366,8 +364,6 @@ public final class RatingCompat implements Parcelable {
|
|||||||
/**
|
/**
|
||||||
* Gets the underlying framework {@link android.media.Rating} object.
|
* Gets the underlying framework {@link android.media.Rating} object.
|
||||||
*
|
*
|
||||||
* <p>This method is only supported on API 19+.
|
|
||||||
*
|
|
||||||
* @return An equivalent {@link android.media.Rating} object, or null if none.
|
* @return An equivalent {@link android.media.Rating} object, or null if none.
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@ -1156,7 +1156,6 @@ public class PlayerNotificationManager {
|
|||||||
* duration} (like for example a live stream).
|
* duration} (like for example a live stream).
|
||||||
* <li>The media is not {@link Player#isPlayingAd() interrupted by an ad}.
|
* <li>The media is not {@link Player#isPlayingAd() interrupted by an ad}.
|
||||||
* <li>The media is played at {@link Player#getPlaybackParameters() regular speed}.
|
* <li>The media is played at {@link Player#getPlaybackParameters() regular speed}.
|
||||||
* <li>The device is running at least API 21 (Lollipop).
|
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* <p>See {@link NotificationCompat.Builder#setUsesChronometer(boolean)}.
|
* <p>See {@link NotificationCompat.Builder#setUsesChronometer(boolean)}.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user