mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Add AudioFocusGain IntDef in AudioFocusManager
PiperOrigin-RevId: 259687632
This commit is contained in:
parent
5e88621ab0
commit
7d2bfdfc62
1 changed files with 4 additions and 3 deletions
|
|
@ -105,9 +105,9 @@ public final class AudioFocusManager {
|
||||||
private final PlayerControl playerControl;
|
private final PlayerControl playerControl;
|
||||||
@Nullable private AudioAttributes audioAttributes;
|
@Nullable private AudioAttributes audioAttributes;
|
||||||
|
|
||||||
private @AudioFocusState int audioFocusState;
|
@AudioFocusState private int audioFocusState;
|
||||||
private int focusGain;
|
@C.AudioFocusGain private int focusGain;
|
||||||
private float volumeMultiplier = 1.0f;
|
private float volumeMultiplier = VOLUME_MULTIPLIER_DEFAULT;
|
||||||
|
|
||||||
private @MonotonicNonNull AudioFocusRequest audioFocusRequest;
|
private @MonotonicNonNull AudioFocusRequest audioFocusRequest;
|
||||||
private boolean rebuildAudioFocusRequest;
|
private boolean rebuildAudioFocusRequest;
|
||||||
|
|
@ -310,6 +310,7 @@ public final class AudioFocusManager {
|
||||||
* @param audioAttributes The audio attributes associated with this focus request.
|
* @param audioAttributes The audio attributes associated with this focus request.
|
||||||
* @return The type of audio focus gain that should be requested.
|
* @return The type of audio focus gain that should be requested.
|
||||||
*/
|
*/
|
||||||
|
@C.AudioFocusGain
|
||||||
private static int convertAudioAttributesToFocusGain(@Nullable AudioAttributes audioAttributes) {
|
private static int convertAudioAttributesToFocusGain(@Nullable AudioAttributes audioAttributes) {
|
||||||
|
|
||||||
if (audioAttributes == null) {
|
if (audioAttributes == null) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue