OSDN Git Service

audio policy: fix volume upon A2DP connection
authorEric Laurent <elaurent@google.com>
Wed, 13 Jun 2012 22:19:32 +0000 (15:19 -0700)
committerThe Android Automerger <android-build@android.com>
Fri, 15 Jun 2012 21:12:16 +0000 (14:12 -0700)
commit4113a42b37257141322c78e5388dcdf42c7a0bf7
treea6199dc46ea2681885fe0f32af65791b6456d4d2
parente3f43309a68a31f6389b0fda6cad91e4d6ab45c6
audio policy: fix volume upon A2DP connection

setForceUse() should not force new device selection on outputs
if the selected device is 0. If a device 0 (no device) selection
is forced on a duplicated output, this causes volumes to be reset to
their default on outputs the duplicated output is connected to.

Also force reapply volumes when a new output is created. It is safer and more
explicit than relying on the fact that the selected volume is different
from default volume and thus is actually sent to audioflinger.

Bug 6658021.

Change-Id: I0a14d5229847e001b0d44f60d41c241efdb9946a
audio/AudioPolicyManagerBase.cpp