summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy/common
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2015-04-23 18:41:29 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2015-04-29 17:54:12 -0700
commitf613d42b12389335b2ecf06df18d0d095d6bfd44 (patch)
treeb36177007932b781d9db2bb973cb2feaab3cde13 /services/audiopolicy/common
parentdae24729d0b3ced8c4a7d7f9b631e852f564db4f (diff)
downloadframeworks_av-f613d42b12389335b2ecf06df18d0d095d6bfd44.zip
frameworks_av-f613d42b12389335b2ecf06df18d0d095d6bfd44.tar.gz
frameworks_av-f613d42b12389335b2ecf06df18d0d095d6bfd44.tar.bz2
AudioSystem callback for dynamic policy mix activity
Add method to AudioPolicyServiceClient for dynamic policy mix activity notification. Propagate notification to a dedicated callback. Bug 20226914 Change-Id: I37928ed38e15ea2b8fed022cccadeca8c4d6c876
Diffstat (limited to 'services/audiopolicy/common')
-rw-r--r--services/audiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/services/audiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp b/services/audiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
index 144d8ad..a278375 100644
--- a/services/audiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
+++ b/services/audiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
@@ -315,13 +315,15 @@ void SwAudioOutputDescriptor::changeRefCount(audio_stream_type_t stream,
mGlobalRefCount += delta;
}
if ((oldGlobalRefCount == 0) && (mGlobalRefCount > 0)) {
- if ((mPolicyMix != NULL) && ((mPolicyMix->mFlags & MIX_FLAG_NOTIFY_ACTIVITY) != 0)) {
+ if ((mPolicyMix != NULL) && ((mPolicyMix->mCbFlags & AudioMix::kCbFlagNotifyActivity) != 0))
+ {
mClientInterface->onDynamicPolicyMixStateUpdate(mPolicyMix->mRegistrationId,
MIX_STATE_MIXING);
}
} else if ((oldGlobalRefCount > 0) && (mGlobalRefCount == 0)) {
- if ((mPolicyMix != NULL) && ((mPolicyMix->mFlags & MIX_FLAG_NOTIFY_ACTIVITY) != 0)) {
+ if ((mPolicyMix != NULL) && ((mPolicyMix->mCbFlags & AudioMix::kCbFlagNotifyActivity) != 0))
+ {
mClientInterface->onDynamicPolicyMixStateUpdate(mPolicyMix->mRegistrationId,
MIX_STATE_IDLE);
}