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

Commit 93511f38 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi Committed by Android Git Automerger
Browse files

am 3ce1648f: Merge "Fix bug 2553575 API REVIEW: android.media Change 1 of 3...

am 3ce1648f: Merge "Fix bug 2553575 API REVIEW: android.media  Change 1 of 3 Notes from API Council review:   Rename onAudioFocusChanged -> onAudioFocusChange" into froyo

Merge commit '3ce1648f' into froyo-plus-aosp

* commit '3ce1648f':
  Fix bug 2553575 API REVIEW: android.media  Change 1 of 3
parents 41e8e4a2 3ce1648f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -81445,7 +81445,7 @@
 deprecated="not deprecated"
 visibility="public"
>
<method name="onAudioFocusChanged"
<method name="onAudioFocusChange"
 return="void"
 abstract="true"
 native="false"
+8 −8
Original line number Diff line number Diff line
@@ -1245,7 +1245,7 @@ public class AudioManager {

    /**
     * Used to indicate a gain of audio focus, or a request of audio focus, of unknown duration.
     * @see OnAudioFocusChangeListener#onAudioFocusChanged(int)
     * @see OnAudioFocusChangeListener#onAudioFocusChange(int)
     * @see #requestAudioFocus(OnAudioFocusChangeListener, int, int)
     */
    public static final int AUDIOFOCUS_GAIN = 1;
@@ -1253,7 +1253,7 @@ public class AudioManager {
     * Used to indicate a temporary gain or request of audio focus, anticipated to last a short
     * amount of time. Examples of temporary changes are the playback of driving directions, or an
     * event notification.
     * @see OnAudioFocusChangeListener#onAudioFocusChanged(int)
     * @see OnAudioFocusChangeListener#onAudioFocusChange(int)
     * @see #requestAudioFocus(OnAudioFocusChangeListener, int, int)
     */
    public static final int AUDIOFOCUS_GAIN_TRANSIENT = 2;
@@ -1263,25 +1263,25 @@ public class AudioManager {
     * after having lowered their output level (also referred to as "ducking").
     * Examples of temporary changes are the playback of driving directions where playback of music
     * in the background is acceptable.
     * @see OnAudioFocusChangeListener#onAudioFocusChanged(int)
     * @see OnAudioFocusChangeListener#onAudioFocusChange(int)
     * @see #requestAudioFocus(OnAudioFocusChangeListener, int, int)
     */
    public static final int AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK = 3;
    /**
     * Used to indicate a loss of audio focus of unknown duration.
     * @see OnAudioFocusChangeListener#onAudioFocusChanged(int)
     * @see OnAudioFocusChangeListener#onAudioFocusChange(int)
     */
    public static final int AUDIOFOCUS_LOSS = -1 * AUDIOFOCUS_GAIN;
    /**
     * Used to indicate a transient loss of audio focus.
     * @see OnAudioFocusChangeListener#onAudioFocusChanged(int)
     * @see OnAudioFocusChangeListener#onAudioFocusChange(int)
     */
    public static final int AUDIOFOCUS_LOSS_TRANSIENT = -1 * AUDIOFOCUS_GAIN_TRANSIENT;
    /**
     * Used to indicate a transient loss of audio focus where the loser of the audio focus can
     * lower its output volume if it wants to continue playing (also referred to as "ducking"), as
     * the new focus owner doesn't require others to be silent.
     * @see OnAudioFocusChangeListener#onAudioFocusChanged(int)
     * @see OnAudioFocusChangeListener#onAudioFocusChange(int)
     */
    public static final int AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK =
            -1 * AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK;
@@ -1303,7 +1303,7 @@ public class AudioManager {
         *   {@link AudioManager#AUDIOFOCUS_LOSS}, {@link AudioManager#AUDIOFOCUS_LOSS_TRANSIENT}
         *   and {@link AudioManager#AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK}.
         */
        public void onAudioFocusChanged(int focusChange);
        public void onAudioFocusChange(int focusChange);
    }

    /**
@@ -1350,7 +1350,7 @@ public class AudioManager {
                            listener = findFocusListener((String)msg.obj);
                        }
                        if (listener != null) {
                            listener.onAudioFocusChanged(msg.what);
                            listener.onAudioFocusChange(msg.what);
                        }
                    }
                };