audiopolicy: Get Hw offloaded A2DP formats from declared devices

Fix implementation of fetching hw offloaded A2DP encoded
formats. Fetch formats from declared A2DP devices on primary
instead of system property.

Bug: 111812273
Test: verify A2DP using multiple headsets, switch A2DP codecs
Change-Id: I4857b24ba5dc6cf089c6f4b961492a53f5ca2018
1 file changed