summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaynes Mathew George <hgeorge@codeaurora.org>2015-10-26 18:22:13 -0700
committerSteve Kondik <steve@cyngn.com>2015-11-07 01:56:20 -0800
commit5e05fbd57a5372c17c10c34bc130511dab8451ca (patch)
tree650c70f1bf148a06db45918bcb9f707be63f3cd5
parent51a7da9ce54572f4291ec9101238cf1df3d6697e (diff)
downloadframeworks_av-5e05fbd57a5372c17c10c34bc130511dab8451ca.zip
frameworks_av-5e05fbd57a5372c17c10c34bc130511dab8451ca.tar.gz
frameworks_av-5e05fbd57a5372c17c10c34bc130511dab8451ca.tar.bz2
AudioPolicyService: Synchronize access to AudioPolicyManager
Synchronize access to APM when getDevicesForStream is called on APM. Change-Id: I2ba6922341f035375270b02000ef5a7e078f6b5a
-rw-r--r--services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp b/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
index ca365a5..a228798 100644
--- a/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
+++ b/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
@@ -463,6 +463,7 @@ audio_devices_t AudioPolicyService::getDevicesForStream(audio_stream_type_t stre
if (mAudioPolicyManager == NULL) {
return AUDIO_DEVICE_NONE;
}
+ Mutex::Autolock _l(mLock);
return mAudioPolicyManager->getDevicesForStream(stream);
}