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

Commit 49e57a2d authored by Jean-Michel Trivi's avatar Jean-Michel Trivi Committed by Android (Google) Code Review
Browse files

Merge "API for app to know what to set in Activity.setVolumeControlStream()"

parents ad2409a2 a6904733
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -20455,6 +20455,7 @@ package android.media {
    method public int getContentType();
    method public int getFlags();
    method public int getUsage();
    method public static int getVolumeControlStream(android.media.AudioAttributes);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int CONTENT_TYPE_MOVIE = 3; // 0x3
    field public static final int CONTENT_TYPE_MUSIC = 2; // 0x2
+1 −0
Original line number Diff line number Diff line
@@ -22016,6 +22016,7 @@ package android.media {
    method public int getContentType();
    method public int getFlags();
    method public int getUsage();
    method public static int getVolumeControlStream(android.media.AudioAttributes);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int CONTENT_TYPE_MOVIE = 3; // 0x3
    field public static final int CONTENT_TYPE_MUSIC = 2; // 0x2
+1 −0
Original line number Diff line number Diff line
@@ -20547,6 +20547,7 @@ package android.media {
    method public int getContentType();
    method public int getFlags();
    method public int getUsage();
    method public static int getVolumeControlStream(android.media.AudioAttributes);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int CONTENT_TYPE_MOVIE = 3; // 0x3
    field public static final int CONTENT_TYPE_MUSIC = 2; // 0x2
+4 −4
Original line number Diff line number Diff line
@@ -913,13 +913,13 @@ public final class AudioAttributes implements Parcelable {
        }
    }
    /**
     * @hide
     * CANDIDATE FOR PUBLIC (or at least SYSTEM) API
     * Returns the stream type matching the given attributes for volume control.
     * Use this method to derive the stream type needed to configure the volume
     * control slider in an {@link Activity} with {@link Activity#setVolumeControlStream(int)}.
     * control slider in an {@link android.app.Activity} with
     * {@link android.app.Activity#setVolumeControlStream(int)}.
     * <BR>Do not use this method to set the stream type on an audio player object
     * (e.g. {@link AudioTrack}, {@link MediaPlayer}), use <code>AudioAttributes</code> instead.
     * (e.g. {@link AudioTrack}, {@link MediaPlayer}) as this is deprecated,
     * use <code>AudioAttributes</code> instead.
     * @param aa non-null AudioAttributes.
     * @return a valid stream type for <code>Activity</code> or stream volume control that matches
     *     the attributes, or {@link AudioManager#USE_DEFAULT_STREAM_TYPE} if there isn't a direct