From a5ec3545f879e882ed5397707f65a4757f7232d5 Mon Sep 17 00:00:00 2001 From: Steve Kondik Date: Mon, 18 Jul 2016 16:50:06 -0700 Subject: 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 --- services/audiopolicy/service/AudioPolicyEffects.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'services/audiopolicy/service') 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 -- cgit v1.1