commit | ad440cefb94828f8d6d22a5f460f5da27ecf4c16 | [log] [tgz] |
---|---|---|
author | Eric Laurent <elaurent@google.com> | Mon Jan 31 10:49:43 2022 +0100 |
committer | Eric Laurent <elaurent@google.com> | Mon Jan 31 15:21:32 2022 +0100 |
tree | c50863e303c8e799e07eabfbbdc05bc2ef21f59f | |
parent | 0fe05c417b4437e09aceb75fa7c647d61b1a0d74 [diff] [blame] |
audio policy: acquire mutex in getDeviceConnecitonState Add missing mutex locking in AudioPolicyService::getDeviceConnectionState() Bug: 215261795 Test: atest audiopolicy_tests Change-Id: I9b13376e9d43e83bff3e21d2bb0455e1b78dc507
diff --git a/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp b/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp index aba8884..87a350f 100644 --- a/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp +++ b/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
@@ -166,6 +166,7 @@ AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE)); return Status::ok(); } + Mutex::Autolock _l(mLock); AutoCallerClear acc; *_aidl_return = VALUE_OR_RETURN_BINDER_STATUS( legacy2aidl_audio_policy_dev_state_t_AudioPolicyDeviceState(