Loading services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -76,10 +76,14 @@ status_t AudioPolicyService::setPhoneState(audio_mode_t state) ALOGV("setPhoneState()"); // acquire lock before calling setMode() so that setMode() + setPhoneState() are an atomic // operation from policy manager standpoint (no other operation (e.g track start or stop) // can be interleaved). Mutex::Autolock _l(mLock); // TODO: check if it is more appropriate to do it in platform specific policy manager AudioSystem::setMode(state); Mutex::Autolock _l(mLock); mAudioPolicyManager->setPhoneState(state); mPhoneState = state; return NO_ERROR; Loading Loading
services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -76,10 +76,14 @@ status_t AudioPolicyService::setPhoneState(audio_mode_t state) ALOGV("setPhoneState()"); // acquire lock before calling setMode() so that setMode() + setPhoneState() are an atomic // operation from policy manager standpoint (no other operation (e.g track start or stop) // can be interleaved). Mutex::Autolock _l(mLock); // TODO: check if it is more appropriate to do it in platform specific policy manager AudioSystem::setMode(state); Mutex::Autolock _l(mLock); mAudioPolicyManager->setPhoneState(state); mPhoneState = state; return NO_ERROR; Loading