History log of /frameworks/base/media/java/android/media/audiopolicy/AudioPolicyConfig.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/AudioPolicyConfig.java
4ad39885f2e6e79ae1faaa41ae240eeffcefd368 15-Mar-2016 Jean-Michel Trivi <jmtrivi@google.com> Dynamic audio policies: device type and address

Store device type and address in audio mixes regardless of the
mix route type, no "registration" field.
For LOOP_BACK mixes, assign the REMOTE_SUBMIX device type.

Bug 25448664

Change-Id: I8d59b2fd3e05b1dcf1081ad826f985f5e3e74769
/frameworks/base/media/java/android/media/audiopolicy/AudioPolicyConfig.java
e8924115f9a57d35149da89c2a1bd920fdd0fe39 04-Mar-2016 Jean-Michel Trivi <jmtrivi@google.com> Dynamic audio policies: allow device passing for RENDER mixes

AudioMix: add system method for specifying an AudioDeviceInfo
to be used by this mix. This only works for AudioMix
instance with the RENDER route flag.
Previous dynamic policy implementation didn't enforce
mix route flag check, but only supported LOOP_BACK,
so make LOOP_BACK the default.
When a policy gets registered and the registration ID is
set on each mix, for RENDER mixes use the device
address for registration.

Bug 25448664

Change-Id: If5789d84ff4c4c25a6e81ba1513a39916220498a
/frameworks/base/media/java/android/media/audiopolicy/AudioPolicyConfig.java
ba6b4b400d850ba18fcb9d5bf9789d490f390acc 10-Feb-2016 Jean-Michel Trivi <jmtrivi@google.com> Dynamic audio policies: JNI support for UID rules

Rename AttributeMatchCriterion to AudioMixMatchCriterion to be consistent
with the fact that now mixing rules are not always about audio attributes.

AudioSystem JNI: add support for UID-based rules.

Bug 26798796

Change-Id: Icb0f57841c94f410e1fac9ed071a829a26b9a58e
/frameworks/base/media/java/android/media/audiopolicy/AudioPolicyConfig.java
4d4b3d54c6bad3ecc71f2003abd398a2f135a052 26-Jan-2016 Jean-Michel Trivi <jmtrivi@google.com> Dynamic audio policies by UID

Add support for audio mix creation by UID.
Refactor AudioAttributes-based mix criteria to a generic Object
interface.

Bug 26798796

Change-Id: Idac256e19019cd1be52168c6127997c3c1bf280e
/frameworks/base/media/java/android/media/audiopolicy/AudioPolicyConfig.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/AudioPolicyConfig.java
08c7116ab9cd04ad6dd3c04aa1017237e7f409ac 28-Feb-2015 John Spurlock <jspurlock@google.com> Remove unused imports in frameworks/base.

Change-Id: I031443de83f93eb57a98863001826671b18f3b17
/frameworks/base/media/java/android/media/audiopolicy/AudioPolicyConfig.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/AudioPolicyConfig.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/AudioPolicyConfig.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/AudioPolicyConfig.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/AudioPolicyConfig.java