Loading media/java/android/media/AudioManager.java +15 −9 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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) { Loading @@ -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 Loading Loading @@ -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) { Loading @@ -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. Loading @@ -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(); Loading Loading
media/java/android/media/AudioManager.java +15 −9 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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) { Loading @@ -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 Loading Loading @@ -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) { Loading @@ -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. Loading @@ -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(); Loading