summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-07-18 16:50:06 -0700
committerSteve Kondik <steve@cyngn.com>2016-07-18 16:51:46 -0700
commita5ec3545f879e882ed5397707f65a4757f7232d5 (patch)
treeff5ed9c7985c17d9495f8a261c1330af82c98cc7
parent940b28bc37f819c62386e393614354f55069e8f6 (diff)
downloadframeworks_av-a5ec3545f879e882ed5397707f65a4757f7232d5.zip
frameworks_av-a5ec3545f879e882ed5397707f65a4757f7232d5.tar.gz
frameworks_av-a5ec3545f879e882ed5397707f65a4757f7232d5.tar.bz2
audiopolicy: Constrain session events to music streams
* We're really only interested in music streams right now, but events are being generated for all streams (system sounds, etc). * Constrain for now, in the future we will filter based on client registrations. Change-Id: Ic445052028c454eed146addebcdb28c4b26c4f20
-rw-r--r--services/audiopolicy/service/AudioPolicyEffects.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/services/audiopolicy/service/AudioPolicyEffects.cpp b/services/audiopolicy/service/AudioPolicyEffects.cpp
index 31b1637..d6fabfe 100644
--- a/services/audiopolicy/service/AudioPolicyEffects.cpp
+++ b/services/audiopolicy/service/AudioPolicyEffects.cpp
@@ -331,6 +331,11 @@ status_t AudioPolicyEffects::updateOutputAudioSessionInfo(audio_io_handle_t /* o
Mutex::Autolock _l(mLock);
+ // TODO: Handle other stream types based on client registration
+ if (stream != AUDIO_STREAM_MUSIC) {
+ return NO_ERROR;
+ }
+
// update AudioSessionInfo. This is used in the stream open/close path
// to notify userspace applications about session creation and
// teardown, allowing the app to make decisions about effects for