Synchronous audio focus behavior with external focus policy
This patch preserves the synchronous nature of audio focus requests, even when an external focus policy is installed. When focus is requested, the request is blocked on the client-side, while AudioService informs the external policy of the request, and until the ext policy responds with the focus request result for this client, or it times out. The new AudioPolicy API is the call for the external policy to send the focus request result. Bug: 63906162 Test: gts-tradefed run gts -m GtsGmscoreHostTestCases -t 'com.google.android.gts.audio.AudioHostTest#testFocusPolicy' Change-Id: I4671517f7f00eaaed8748bd4013b7d20be3085fb
This commit is contained in:
@@ -2513,6 +2513,7 @@ package android.media {
|
||||
method public int requestAudioFocus(android.media.AudioManager.OnAudioFocusChangeListener, android.media.AudioAttributes, int, int) throws java.lang.IllegalArgumentException;
|
||||
method public deprecated int requestAudioFocus(android.media.AudioManager.OnAudioFocusChangeListener, android.media.AudioAttributes, int, int, android.media.audiopolicy.AudioPolicy) throws java.lang.IllegalArgumentException;
|
||||
method public int requestAudioFocus(android.media.AudioFocusRequest, android.media.audiopolicy.AudioPolicy);
|
||||
method public void setFocusRequestResult(android.media.AudioFocusInfo, int, android.media.audiopolicy.AudioPolicy);
|
||||
method public void unregisterAudioPolicyAsync(android.media.audiopolicy.AudioPolicy);
|
||||
field public static final int AUDIOFOCUS_FLAG_DELAY_OK = 1; // 0x1
|
||||
field public static final int AUDIOFOCUS_FLAG_LOCK = 4; // 0x4
|
||||
|
||||
Reference in New Issue
Block a user