Merge "Media2: Make Javadoc consistent for recommending use of AndroidX" into qt-dev
am: d1a84cb578
Change-Id: Ib6a50aa5aedbb0183343334aa39a4f2c5f1f6698
This commit is contained in:
@@ -46,14 +46,14 @@ import android.util.Log;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
/**
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/session/package-summary.html">Media2 session
|
||||
* Library</a> for consistent behavior across all devices.
|
||||
*
|
||||
* Allows an app to interact with an active {@link MediaSession2} or a
|
||||
* {@link MediaSession2Service} which would provide {@link MediaSession2}. Media buttons and other
|
||||
* commands can be sent to the session.
|
||||
* <p>
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/package-summary.html">Media2 Library</a>
|
||||
* for consistent behavior across all devices.
|
||||
*/
|
||||
public class MediaController2 implements AutoCloseable {
|
||||
static final String TAG = "MediaController2";
|
||||
@@ -405,6 +405,11 @@ public class MediaController2 implements AutoCloseable {
|
||||
}
|
||||
|
||||
/**
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/session/package-summary.html">Media2 session
|
||||
* Library</a> for consistent behavior across all devices.
|
||||
* <p>
|
||||
* Builder for {@link MediaController2}.
|
||||
* <p>
|
||||
* Any incoming event from the {@link MediaSession2} will be handled on the callback
|
||||
@@ -502,9 +507,12 @@ public class MediaController2 implements AutoCloseable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface for listening to change in activeness of the {@link MediaSession2}.
|
||||
* <p>
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/session/package-summary.html">Media2 session
|
||||
* Library</a> for consistent behavior across all devices.
|
||||
* <p>
|
||||
* Interface for listening to change in activeness of the {@link MediaSession2}.
|
||||
*/
|
||||
public abstract static class ControllerCallback {
|
||||
/**
|
||||
|
||||
@@ -52,13 +52,13 @@ import java.util.Objects;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
/**
|
||||
* Allows a media app to expose its transport controls and playback information in a process to
|
||||
* other processes including the Android framework and other apps.
|
||||
* <p>
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/package-summary.html">Media2 Library</a>
|
||||
* for consistent behavior across all devices.
|
||||
* <a href="{@docRoot}reference/androidx/media2/session/package-summary.html">Media2 session
|
||||
* Library</a> for consistent behavior across all devices.
|
||||
* <p>
|
||||
* Allows a media app to expose its transport controls and playback information in a process to
|
||||
* other processes including the Android framework and other apps.
|
||||
*/
|
||||
public class MediaSession2 implements AutoCloseable {
|
||||
static final String TAG = "MediaSession2";
|
||||
@@ -481,6 +481,11 @@ public class MediaSession2 implements AutoCloseable {
|
||||
}
|
||||
|
||||
/**
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/session/package-summary.html">Media2 session
|
||||
* Library</a> for consistent behavior across all devices.
|
||||
* <p>
|
||||
* Builder for {@link MediaSession2}.
|
||||
* <p>
|
||||
* Any incoming event from the {@link MediaController2} will be handled on the callback
|
||||
@@ -616,9 +621,12 @@ public class MediaSession2 implements AutoCloseable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Information of a controller.
|
||||
* <p>
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/session/package-summary.html">Media2 session
|
||||
* Library</a> for consistent behavior across all devices.
|
||||
* <p>
|
||||
* Information of a controller.
|
||||
*/
|
||||
public static final class ControllerInfo {
|
||||
private final RemoteUserInfo mRemoteUserInfo;
|
||||
@@ -807,9 +815,12 @@ public class MediaSession2 implements AutoCloseable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback to be called for all incoming commands from {@link MediaController2}s.
|
||||
* <p>
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/session/package-summary.html">Media2 session
|
||||
* Library</a> for consistent behavior across all devices.
|
||||
* <p>
|
||||
* Callback to be called for all incoming commands from {@link MediaController2}s.
|
||||
*/
|
||||
public abstract static class SessionCallback {
|
||||
/**
|
||||
|
||||
@@ -44,12 +44,12 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Service containing {@link MediaSession2}.
|
||||
* <p>
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/package-summary.html">Media2 Library</a>
|
||||
* for consistent behavior across all devices.
|
||||
* <a href="{@docRoot}reference/androidx/media2/session/package-summary.html">Media2 session
|
||||
* Library</a> for consistent behavior across all devices.
|
||||
* <p>
|
||||
* Service containing {@link MediaSession2}.
|
||||
*/
|
||||
public abstract class MediaSession2Service extends Service {
|
||||
/**
|
||||
@@ -287,6 +287,11 @@ public abstract class MediaSession2Service extends Service {
|
||||
}
|
||||
|
||||
/**
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/session/package-summary.html">Media2 session
|
||||
* Library</a> for consistent behavior across all devices.
|
||||
* <p>
|
||||
* Returned by {@link #onUpdateNotification(MediaSession2)} for making session service
|
||||
* foreground service to keep playback running in the background. It's highly recommended to
|
||||
* show media style notification here.
|
||||
|
||||
@@ -26,6 +26,11 @@ import android.text.TextUtils;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/session/package-summary.html">Media2 session
|
||||
* Library</a> for consistent behavior across all devices.
|
||||
* <p>
|
||||
* Define a command that a {@link MediaController2} can send to a {@link MediaSession2}.
|
||||
* <p>
|
||||
* If {@link #getCommandCode()} isn't {@link #COMMAND_CODE_CUSTOM}), it's predefined command.
|
||||
@@ -35,11 +40,6 @@ import java.util.Objects;
|
||||
* Refer to the
|
||||
* <a href="{@docRoot}reference/androidx/media2/SessionCommand2.html">AndroidX SessionCommand</a>
|
||||
* class for the list of valid commands.
|
||||
* <p>
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/package-summary.html">Media2 Library</a>
|
||||
* for consistent behavior across all devices.
|
||||
*/
|
||||
public final class Session2Command implements Parcelable {
|
||||
/**
|
||||
@@ -162,6 +162,11 @@ public final class Session2Command implements Parcelable {
|
||||
}
|
||||
|
||||
/**
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/session/package-summary.html">Media2 session
|
||||
* Library</a> for consistent behavior across all devices.
|
||||
* <p>
|
||||
* Contains the result of {@link Session2Command}.
|
||||
*/
|
||||
public static final class Result {
|
||||
|
||||
@@ -28,13 +28,12 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* A set of {@link Session2Command} which represents a command group.
|
||||
* <p>
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/package-summary.html">Media2 Library</a>
|
||||
* for consistent behavior across all devices.
|
||||
* </p>
|
||||
* <a href="{@docRoot}reference/androidx/media2/session/package-summary.html">Media2 session
|
||||
* Library</a> for consistent behavior across all devices.
|
||||
* <p>
|
||||
* A set of {@link Session2Command} which represents a command group.
|
||||
*/
|
||||
public final class Session2CommandGroup implements Parcelable {
|
||||
private static final String TAG = "Session2CommandGroup";
|
||||
@@ -131,6 +130,11 @@ public final class Session2CommandGroup implements Parcelable {
|
||||
}
|
||||
|
||||
/**
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/session/package-summary.html">Media2 session
|
||||
* Library</a> for consistent behavior across all devices.
|
||||
* <p>
|
||||
* Builds a {@link Session2CommandGroup} object.
|
||||
*/
|
||||
public static final class Builder {
|
||||
|
||||
@@ -36,13 +36,13 @@ import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Represents an ongoing {@link MediaSession2} or a {@link MediaSession2Service}.
|
||||
* If it's representing a session service, it may not be ongoing.
|
||||
* <p>
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/package-summary.html">Media2 Library</a>
|
||||
* for consistent behavior across all devices.
|
||||
* <a href="{@docRoot}reference/androidx/media2/session/package-summary.html">Media2 session
|
||||
* Library</a> for consistent behavior across all devices.
|
||||
* <p>
|
||||
* Represents an ongoing {@link MediaSession2} or a {@link MediaSession2Service}.
|
||||
* If it's representing a session service, it may not be ongoing.
|
||||
* <p>
|
||||
* This may be passed to apps by the session owner to allow them to create a
|
||||
* {@link MediaController2} to communicate with the session.
|
||||
|
||||
@@ -119,6 +119,11 @@ public final class MediaSessionManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/session/package-summary.html">Media2 session
|
||||
* Library</a> for consistent behavior across all devices.
|
||||
* <p>
|
||||
* Notifies that a new {@link MediaSession2} with type {@link Session2Token#TYPE_SESSION} is
|
||||
* created.
|
||||
* <p>
|
||||
@@ -192,6 +197,11 @@ public final class MediaSessionManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/session/package-summary.html">Media2 session
|
||||
* Library</a> for consistent behavior across all devices.
|
||||
* <p>
|
||||
* Gets a list of {@link Session2Token} with type {@link Session2Token#TYPE_SESSION} for the
|
||||
* current user.
|
||||
* <p>
|
||||
@@ -335,12 +345,12 @@ public final class MediaSessionManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a listener to be notified when the {@link #getSession2Tokens()} changes.
|
||||
* <p>
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/package-summary.html">Media2 Library</a>
|
||||
* for consistent behavior across all devices.
|
||||
* <a href="{@docRoot}reference/androidx/media2/session/package-summary.html">Media2 session
|
||||
* Library</a> for consistent behavior across all devices.
|
||||
* <p>
|
||||
* Adds a listener to be notified when the {@link #getSession2Tokens()} changes.
|
||||
*
|
||||
* @param listener The listener to add
|
||||
*/
|
||||
@@ -350,12 +360,12 @@ public final class MediaSessionManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a listener to be notified when the {@link #getSession2Tokens()} changes.
|
||||
* <p>
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/package-summary.html">Media2 Library</a>
|
||||
* for consistent behavior across all devices.
|
||||
* <a href="{@docRoot}reference/androidx/media2/session/package-summary.html">Media2 session
|
||||
* Library</a> for consistent behavior across all devices.
|
||||
* <p>
|
||||
* Adds a listener to be notified when the {@link #getSession2Tokens()} changes.
|
||||
*
|
||||
* @param listener The listener to add
|
||||
* @param handler The handler to call listener on.
|
||||
@@ -366,12 +376,12 @@ public final class MediaSessionManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a listener to be notified when the {@link #getSession2Tokens()} changes.
|
||||
* <p>
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/package-summary.html">Media2 Library</a>
|
||||
* for consistent behavior across all devices.
|
||||
* <a href="{@docRoot}reference/androidx/media2/session/package-summary.html">Media2 session
|
||||
* Library</a> for consistent behavior across all devices.
|
||||
* <p>
|
||||
* Adds a listener to be notified when the {@link #getSession2Tokens()} changes.
|
||||
*
|
||||
* @param userId The userId to listen for changes on
|
||||
* @param listener The listener to add
|
||||
@@ -402,6 +412,11 @@ public final class MediaSessionManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/session/package-summary.html">Media2 session
|
||||
* Library</a> for consistent behavior across all devices.
|
||||
* <p>
|
||||
* Removes the {@link OnSession2TokensChangedListener} to stop receiving session token updates.
|
||||
*
|
||||
* @param listener The listener to remove.
|
||||
@@ -765,13 +780,13 @@ public final class MediaSessionManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Listens for changes to the {@link #getSession2Tokens()}. This can be added
|
||||
* using {@link #addOnSession2TokensChangedListener(OnSession2TokensChangedListener, Handler)}.
|
||||
* <p>
|
||||
* This API is not generally intended for third party application developers.
|
||||
* Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
|
||||
* <a href="{@docRoot}reference/androidx/media2/package-summary.html">Media2 Library</a>
|
||||
* for consistent behavior across all devices.
|
||||
* <a href="{@docRoot}reference/androidx/media2/session/package-summary.html">Media2 session
|
||||
* Library</a> for consistent behavior across all devices.
|
||||
* <p>
|
||||
* Listens for changes to the {@link #getSession2Tokens()}. This can be added
|
||||
* using {@link #addOnSession2TokensChangedListener(OnSession2TokensChangedListener, Handler)}.
|
||||
*/
|
||||
public interface OnSession2TokensChangedListener {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user