OSDN Git Service

Fix issue 3142808.
authorEric Laurent <elaurent@google.com>
Tue, 2 Nov 2010 19:03:04 +0000 (12:03 -0700)
committerEric Laurent <elaurent@google.com>
Wed, 3 Nov 2010 01:18:13 +0000 (18:18 -0700)
commit2f2db765228f110b37a2851d1199d3c72d313c6d
tree388bff64fa78ea4246f714f198fd6a4582912e3b
parentd6e68c3ae5677bc6127628d1c700b11c8f0fcdaf
Fix issue 3142808.

There is a bug in the way audio policy manager handles A2DP interface suspend/restore
when SCO is used. This bug is not new but has been triggered by a change in the timing
of the events received by audio policy manager when a call is setup and torn down
introduced by commit 164a8f86c7e48992691368c4895709c3bdb835a4.

The fix consists in grouping the control of A2DP suspended state in a single function
that is called systematically when conditions affecting this state are changed:
- call state change
- device connection/disconnection
- change in forced usage.

Change-Id: Ib76a999513b5afbfd59ba945f8650d2a48d6f480
include/hardware_legacy/AudioPolicyManagerBase.h