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

Commit 3b0014dc authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "MediaSession2: Unhide setAudioFocusRequest"

parents 8e152219 12a1f627
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -24830,6 +24830,7 @@ package android.media {
    method public void sendCustomCommand(android.media.MediaSession2.Command, android.os.Bundle);
    method public void sendCustomCommand(android.media.MediaSession2.ControllerInfo, android.media.MediaSession2.Command, android.os.Bundle, android.os.ResultReceiver);
    method public void setAllowedCommands(android.media.MediaSession2.ControllerInfo, android.media.MediaSession2.CommandGroup);
    method public void setAudioFocusRequest(android.media.AudioFocusRequest);
    method public void setCustomLayout(android.media.MediaSession2.ControllerInfo, java.util.List<android.media.MediaSession2.CommandButton>);
    method public void setPlaybackSpeed(float);
    method public void setPlaylist(java.util.List<android.media.MediaItem2>);
+5 −16
Original line number Diff line number Diff line
@@ -1229,24 +1229,13 @@ public class MediaSession2 implements AutoCloseable, MediaPlaylistController {
    }

    /**
     * Sets which type of audio focus will be requested during the playback, or configures playback
     * to not request audio focus. Valid values for focus requests are
     * {@link AudioManager#AUDIOFOCUS_GAIN}, {@link AudioManager#AUDIOFOCUS_GAIN_TRANSIENT},
     * {@link AudioManager#AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK}, and
     * {@link AudioManager#AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE}. Or use
     * {@link AudioManager#AUDIOFOCUS_NONE} to express that audio focus should not be
     * requested when playback starts. You can for instance use this when playing a silent animation
     * through this class, and you don't want to affect other audio applications playing in the
     * background.
     * Set the {@link AudioFocusRequest} to obtain the audio focus
     *
     * @param focusGain the type of audio focus gain that will be requested, or
     *                  {@link AudioManager#AUDIOFOCUS_NONE} to disable the use audio focus during
     *                  playback.
     * @hide
     * @param afr the full request parameters
     */
    // TODO(jaewan): Revisit
    public void setAudioFocusRequest(int focusGain) {
        mProvider.setAudioFocusRequest_impl(focusGain);
    public void setAudioFocusRequest(AudioFocusRequest afr) {
        // TODO: implement this
        // mProvider.setAudioFocusRequest_impl(focusGain);
    }

    /**