OSDN Git Service

audio policy: acquire lock for volume functions
authorEric Laurent <elaurent@google.com>
Fri, 15 Jun 2012 21:45:03 +0000 (14:45 -0700)
committerEric Laurent <elaurent@google.com>
Tue, 19 Jun 2012 15:35:34 +0000 (08:35 -0700)
commit5f12136299918ea30555f3481668ec0dbb775e5f
tree69acc85f312c0bf1577eeccf16e31e0ecd226269
parent1222bb9d9551cdf84923ea342ca3f4210867bd9a
audio policy: acquire lock for volume functions

Acquire the AudioPolicyService mutex when executing
setStreamVolumeIndex() and getStreamVolumeIndex().

These functions have become more complex and iterate on the
list of opened outputs and it is safer to acquire the
AudioPolicyService mutex to avoid concurrency with other
functions.

Bug 6626532.

Change-Id: Ifdcbbbf13338fd9a59f694d43faa7ade143f94bf
services/audioflinger/AudioPolicyService.cpp