Audio focus: framework enforces ducking
When an application requests audio focus with AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK
automatically duck any active players of the current focus owner, unless:
- the player is a SoundPool
- the player plays content of type AudioAttributes.CONTENT_TYPE_SPEECH
- the focus owner requested focus with an AudioFocusRequest which
returns true for willPauseWhenDucked().
- the focus owner and requester share the same UID
Test: cts-tradefed run cts -m CtsMediaTestCases -t android.media.cts.AudioFocusTest#testAudioFocusRequestGainLossTransient
Bug: 30258418
Change-Id: I997905089252be410d58e03b350b6aa8a0d98e61
2 files changed