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

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

Merge "Update javadoc in android.media.AudioManager to not hide the...

Merge "Update javadoc in android.media.AudioManager to not hide the registerAudioFocusListener() methods." into froyo
parents fe089334 46b3a180
Loading
Loading
Loading
Loading
+15 −9
Original line number Diff line number Diff line
@@ -1382,7 +1382,10 @@ public class AudioManager {
    }

    /**
     * TODO hide
     * Registers a listener to be called when audio focus changes. Calling this method is optional
     * before calling {@link #requestAudioFocus(OnAudioFocusChangeListener, int, int)}, as it
     * will register the listener as well if it wasn't registered already.
     * @param l the listener to be notified of audio focus changes.
     */
    public void registerAudioFocusListener(OnAudioFocusChangeListener l) {
        synchronized(mFocusListenerLock) {
@@ -1394,7 +1397,8 @@ public class AudioManager {
    }

    /**
     * TODO hide
     * Causes the specified listener to not be called anymore when focus is gained or lost.
     * @param l the listener to unregister.
     */
    public void unregisterAudioFocusListener(OnAudioFocusChangeListener l) {

@@ -1406,18 +1410,18 @@ public class AudioManager {


    /**
     * TODO document for SDK
     * A failed focus change request.
     */
    public static final int AUDIOFOCUS_REQUEST_FAILED = 0;
    /**
     * TODO document for SDK
     * A successful focus change request.
     */
    public static final int AUDIOFOCUS_REQUEST_GRANTED = 1;


    /**
     *  Request audio focus.
     *  Send a request to obtain the audio focus for a specific stream type
     *  Send a request to obtain the audio focus
     *  @param l the listener to be notified of audio focus changes
     *  @param streamType the main audio stream type affected by the focus request
     *  @param durationHint use {@link #AUDIOFOCUS_GAIN_TRANSIENT} to indicate this focus request
@@ -1450,8 +1454,8 @@ public class AudioManager {


    /**
     *  TODO document for SDK
     *  Abandon audio focus.
     *  Abandon audio focus. Causes the previous focus owner, if any, to receive focus.
     *  @param l the listener with which focus was requested.
     *  @return {@link #AUDIOFOCUS_REQUEST_FAILED} or {@link #AUDIOFOCUS_REQUEST_GRANTED}
     */
    public int abandonAudioFocus(OnAudioFocusChangeListener l) {
@@ -1471,7 +1475,7 @@ public class AudioManager {
    //====================================================================
    // Remote Control
    /**
     * TODO document for SDK
     * Register a component to be the sole receiver of MEDIA_BUTTON intents.
     * @param eventReceiver identifier of a {@link android.content.BroadcastReceiver}
     *      that will receive the media button intent. This broadcast receiver must be declared
     *      in the application manifest.
@@ -1487,7 +1491,9 @@ public class AudioManager {
    }

    /**
     * TODO document for SDK
     * Unregister the receiver of MEDIA_BUTTON intents.
     * @param eventReceiver identifier of a {@link android.content.BroadcastReceiver}
     *      that was registered with {@link #registerMediaButtonEventReceiver(ComponentName)}.
     */
    public void unregisterMediaButtonEventReceiver(ComponentName eventReceiver) {
        IAudioService service = getService();