AudioFocusRequestCompat
@UnstableApi
public final class AudioFocusRequestCompat
Compatibility version of an AudioFocusRequest with fallbacks for older Android versions.
Summary
Nested types |
|---|
public final class AudioFocusRequestCompat.BuilderBuilder class for |
Public fields |
|
|---|---|
final AudioAttributes |
|
final Handler |
|
final int |
|
final AudioManager.OnAudioFocusChangeListener |
Public methods |
|
|---|---|
AudioFocusRequestCompat.Builder |
Returns new |
boolean |
|
AudioAttributes |
Returns the |
Handler |
Returns the |
int |
Returns the type of |
AudioManager.OnAudioFocusChangeListener |
Returns the |
int |
hashCode() |
boolean |
Returns whether the application that would use this |
Public fields
onAudioFocusChangeListener
public final AudioManager.OnAudioFocusChangeListener onAudioFocusChangeListener
Public methods
buildUpon
public AudioFocusRequestCompat.Builder buildUpon()
Returns new Builder with all values of this instance pre-populated.
getAudioAttributes
public AudioAttributes getAudioAttributes()
Returns the AudioAttributes set for this AudioFocusRequestCompat, or the default attributes if none were set.
getFocusChangeHandler
public Handler getFocusChangeHandler()
Returns the Handler to be used for the AudioManager.OnAudioFocusChangeListener.
getFocusGain
@AudioManagerCompat.AudioFocusGain
public int getFocusGain()
Returns the type of AudioManagerCompat.AudioFocusGain configured for this
AudioFocusRequestCompat.
getOnAudioFocusChangeListener
public AudioManager.OnAudioFocusChangeListener getOnAudioFocusChangeListener()
Returns the AudioManager.OnAudioFocusChangeListener set for this
AudioFocusRequestCompat.
| Returns | |
|---|---|
AudioManager.OnAudioFocusChangeListener |
The |
willPauseWhenDucked
public boolean willPauseWhenDucked()
Returns whether the application that would use this AudioFocusRequestCompat would pause when it is requested to duck. This value is only applicable on O and later.