Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9917209b authored by Jaewan Kim's avatar Jaewan Kim Committed by android-build-merger
Browse files

Merge "Media2: Make Javadoc consistent for recommending use of AndroidX" into qt-dev

am: d1a84cb5

Change-Id: Ib6a50aa5aedbb0183343334aa39a4f2c5f1f6698
parents ef430bb1 d1a84cb5
Loading
Loading
Loading
Loading
+15 −7
Original line number Diff line number Diff line
@@ -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 {
        /**
+20 −9
Original line number Diff line number Diff line
@@ -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 {
        /**
+9 −4
Original line number Diff line number Diff line
@@ -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.
+10 −5
Original line number Diff line number Diff line
@@ -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 {
+9 −5
Original line number Diff line number Diff line
@@ -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 {
Loading