diff options
| -rw-r--r-- | api/current.txt | 1 | ||||
| -rw-r--r-- | media/java/android/media/AudioManager.java | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/api/current.txt b/api/current.txt index 800acc22326e..9d6a3292baf1 100644 --- a/api/current.txt +++ b/api/current.txt @@ -11651,6 +11651,7 @@ package android.media { field public static final int ADJUST_SAME = 0; // 0x0 field public static final int AUDIOFOCUS_GAIN = 1; // 0x1 field public static final int AUDIOFOCUS_GAIN_TRANSIENT = 2; // 0x2 + field public static final int AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE = 4; // 0x4 field public static final int AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK = 3; // 0x3 field public static final int AUDIOFOCUS_LOSS = -1; // 0xffffffff field public static final int AUDIOFOCUS_LOSS_TRANSIENT = -2; // 0xfffffffe diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java index 567e5fe75c38..14cdbb7d4e24 100644 --- a/media/java/android/media/AudioManager.java +++ b/media/java/android/media/AudioManager.java @@ -1817,8 +1817,6 @@ public class AudioManager { */ public static final int AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK = 3; /** - * @hide - * CANDIDATE FOR PUBLIC API * Used to indicate a temporary request of audio focus, anticipated to last a short * amount of time, during which no other applications, or system components, should play * anything. Examples of exclusive and transient audio focus requests are voice @@ -1991,6 +1989,9 @@ public class AudioManager { * for the playback of driving directions, or notifications sounds. * Use {@link #AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK} to indicate also that it's ok for * the previous focus owner to keep playing if it ducks its audio output. + * Alternatively use {@link #AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE} for a temporary request + * that benefits from the system not playing disruptive sounds like notifications, for + * usecases such as voice memo recording, or speech recognition. * Use {@link #AUDIOFOCUS_GAIN} for a focus request of unknown duration such * as the playback of a song or a video. * @return {@link #AUDIOFOCUS_REQUEST_FAILED} or {@link #AUDIOFOCUS_REQUEST_GRANTED} |