History log of /frameworks/base/media/java/android/media/audiopolicy/AudioPolicy.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
af576a0e4fa9c9fe06a185007d5f201d80e4ebd1 14-Feb-2018 Jean-Michel Trivi <jmtrivi@google.com> AudioPolicy: support for add/remove AudioMix without unregistering

System API for a registered AudioPolicy to attach or detach
AudioMix without having to unregister, and then registering
the new mix configuration.

Bug: 63906162
Test: AudioPolicyTest

Change-Id: Ib2fea8aa034d3f7b498e76dc1fc51c1ea508d3a2
/frameworks/base/media/java/android/media/audiopolicy/AudioPolicy.java
ebc80c8c4604468475cf04b709209fb6e522ee7c 14-Feb-2018 Jean-Michel Trivi <jmtrivi@google.com> AudioPolicy: media dynamic mix is fixed volume

Bug: 70859923
Test: gts-tradefed run-gts -m GtsGmscoreHostTestCases -t 'com.google.android.gts.audio.AudioHostTest#testTwoChannelCapturing'
Change-Id: Ie9a30e2607ae4ae9a9dd128e3bd80d7582eb381e
/frameworks/base/media/java/android/media/audiopolicy/AudioPolicy.java
e2d8aae2ccc51340cf4846ce28f635b825711368 31-Jan-2018 Jean-Michel Trivi <jmtrivi@google.com> 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
/frameworks/base/media/java/android/media/audiopolicy/AudioPolicy.java
1b926e7ecee537fbff7ec6674a03133064743340 30-Jan-2018 Jean-Michel Trivi <jmtrivi@google.com> AudioPolicy: fix typos

Test: build
Change-Id: I6f99fcf23d7d154280b86c93892e0d0f9d856702
/frameworks/base/media/java/android/media/audiopolicy/AudioPolicy.java
610aa9b416f8db782a54b1c1c4115ed350a08e69 28-Jan-2018 Jean-Michel Trivi <jmtrivi@google.com> Add support for external volume handler of volume adjustements

For devices that use the config_handleVolumeKeysInWindowManager
configuration, add API to receive volume key-related events
directly, without them being processed by the framework
(already not received by apps).

Bug: b/63906162
Test: set config_handleVolumeKeysInWindowManager, use
"adb shell dumpsys audio" to verify adjustVolume methods aren't
logged

Change-Id: I432b14fa9980764d69077b9f1b23b8c95f30814d
/frameworks/base/media/java/android/media/audiopolicy/AudioPolicy.java
7934aab6285189c29729f29de45396eb0e66ce81 06-Jul-2017 Scott Randolph <randolphs@google.com> Fix typo in AudioPolicy comments

Make it clear that setAudioPolicyFocusListener is required when external
focus control is desired (as opposed to previously mentioned
setAudioPolicyStatusListener).

Test: Inspection of the code.
Change-Id: I6d933feb3bf998d10a10b58ec6804dbab34e2036
/frameworks/base/media/java/android/media/audiopolicy/AudioPolicy.java
126cf03f7c8e825a23e47dd133e77eb1b3b7633d 03-Apr-2017 Jean-Michel Trivi <jmtrivi@google.com> Audio focus: API for external audio focus policy

System API for an external audio focus policy. Extends
the system focus listener with interception of
focus requests and abandons. Adds method for the focus
policy to dispatch focus grants and losses.

Test: gts-tradefed run gts -m GtsGmscoreHostTestCases -t 'com.google.android.gts.audio.AudioHostTest#testFocusPolicy'
Bug: 30258418
Change-Id: If408569a2dce07a774e0e2f1be9f1af8e426d2d3
/frameworks/base/media/java/android/media/audiopolicy/AudioPolicy.java
5a56109d1f5c00404c8f0e4281b9ac1392d72886 24-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> AudioService receives callback for dynamic policy mix state changes

AudioService registers a callback for dynamic policies from
AudioSystem.
AudioSystem keeps track of a single callback for dynamic policies.

Bug 20226914

Change-Id: I48899d20d1dbb47bb680e733a3bc9fd064b60f07
/frameworks/base/media/java/android/media/audiopolicy/AudioPolicy.java
0212be5150fb9fb3c340f3c7e51f6126372cc6f9 24-Nov-2014 Jean-Michel Trivi <jmtrivi@google.com> Support collaborative audio focus handling

Add new flag for an app to define it doesn't duck, but rather
pauses when losing focus with AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK.
This flag is to be used when requesting focus.
Add support for AudioPolicy to specify whether it will implement
ducking itself, rather than it being handled by an app.
When ducking is handled by a policy, do not notify focus owners
when they lose audio focus with LOSS_TRANSIENT_CAN_DUCK, unless
they would have paused, as expressed with the
AUDIOFOCUS_FLAG_PAUSES_ON_DUCKABLE_LOSS flag.
Add a focus listener for a policy to be notified of focus changes
so it can properly implement its own ducking.

Bug 16010554

Change-Id: I11d7cdb85c52fd086128a44f4d938aaa44db5c25
/frameworks/base/media/java/android/media/audiopolicy/AudioPolicy.java
1b3541d5eedb332ea01066b4a78a2d06d5304044 25-Nov-2014 Jean-Michel Trivi <jmtrivi@google.com> AudioMix address and type, rule exclusion API, dynamic source

- Simplify API for defining an exclusion-based rule: don't define
an exclusion rule, add instead a way to exclude a rule.
- API for defining rules for dynamic sources (rule match on capture
preset).
- Verify mix type when creating AudioRecord or AudioTrack for a mix.
- Use hashcode of mix for generating the device address.
- AudioService dump prints info about registered policies.
- Annotate as SystemApi the audio policy-related APIs.
- Express mixing match and exclude rule constants as flags for
future-proofness

Bug 16006090
Bug 16009464

Change-Id: I0dabe71204501acaffea7ef0ddbbab9700e1bd87
/frameworks/base/media/java/android/media/audiopolicy/AudioPolicy.java
8dc1031453377d2f9d9c7847027f276e6726a4c8 20-Nov-2014 Jean-Michel Trivi <jmtrivi@google.com> Convert record channel mask for dynamic mix

When creating the AudioRecord instance for a dynamic mix, convert
the output channel mask of the mix to an input channel mask
to be used by the AudioRecord instance through which the
mixed audio is rerouted.

Bug 16009464

Change-Id: I3addbe85339f6f06b69acc3f9b8e2a765e5d7305
/frameworks/base/media/java/android/media/audiopolicy/AudioPolicy.java
8fdb0d4defb6ee2ca8057d3442ead36b408b6c17 17-Jul-2014 Jean-Michel Trivi <jmtrivi@google.com> More AudioPolicy registration

Define new usage in AudioAttributes to describe "virtual" sources.
Maintain a registration string in AudioPolicy and AudioMix that
is used for the address of the mix in the native policy manager.
AudioPolicy registration marks the audio policy configuration and
the audio mixes as registered.
The AudioPolicy class is used as the factory for the AudioTrack
and AudioRecord objects that are respectively used as the
source and sink of the mixes created by the policy owner.

Bug 16009464

Change-Id: I8e5bd351495257597c513d22597e273fcabdbc55
/frameworks/base/media/java/android/media/audiopolicy/AudioPolicy.java
a8b6bd88cfb010c9e9aa1339e504fd593919e1e0 01-Jul-2014 Jean-Michel Trivi <jmtrivi@google.com> Define audio policy, mixes, and mixing rules

An AudioMixingRule is a collection of AudioAttributes and match/exclude
rules.
An AudioMix is defined by its AudioMixingRule, AudioFormat and
routing flag.
An AudioPolicyConfig is a collection of AudioMix and is
parcellable.
An AudioPolicy has an AudioPolicyConfig, and
can be registered/unregistered through AudioManager.

bug 16009464

Change-Id: I01bf95d014967f48ba823648ea897779da099e5d
/frameworks/base/media/java/android/media/audiopolicy/AudioPolicy.java