audioflinger: Allow mixed use of JB A2DP HALs and ICS policy

Old policies don't address the modules by handle and expect them
all to be scanned for supported devices; new modules stopped
listing supported devices. The combination of a new A2DP with
an old policy left policy unable to find A2DP outputs, so the
new HALs couldn't be used.

So... if an old policy is in use, searching for an A2DP output,
and finds a non-primary HAL that doesn't list any device, assume
it's A2DP and use it.

Change-Id: Ie946c065b5c325afd02ba3437077f634e079b386
Add support for ICS audio blobs

Enable with the ICS_AUDIO_BLOB CFLAG

Change-Id: Ie174d5997202b8931c1f11db62b6ec2e377f096a

Conflicts:
	services/audioflinger/AudioFlinger.cpp

Conflicts:
	services/audioflinger/AudioFlinger.cpp
	services/audioflinger/AudioPolicyService.cpp
More ifdefs for ICS audio blobs support

Change-Id: I1e01db9b7cb2da45a3e52aafe7574b689a9c57f4
Added ifndef ICS_AUDIO_BLOB around non-existent functions (3/3)

For older audio blobs where is_source_active and is_stream_active_remotely
doesn't exist, receiving a notification and dumpsys crashes the audio service.

Change-Id: I554f00ba7f171d2ea91627cae2281623383b3ca7

Conflicts:
	services/audioflinger/AudioPolicyService.cpp
frameworks_av: Support pre-KitKat audio blobs

Patch Set 2: Combined duplicated method

Change-Id: I6384c13b0944a25cdf0cb90031b2e3698bc3e78d
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>

Conflicts:
	services/audioflinger/AudioFlinger.cpp
libnbaio: Don't call get_presentation_position for pre KitKat blobs

This fixes a crash with the HTC Tegra3 audio blob where
mStream->get_presentation_position is not NULL but pointing to a unknown
position in memory.

Change-Id: I0ff0ab064c1ac16a128bb3f24d4a473b3164f36d
libnbaio: Fix previous get_presentation_position commit

The previous commit has no effect because HAVE_PRE_KITKAT_AUDIO_BLOB is
actually never defined.

Change-Id: Ic41b5f02c2cee741aaacce6da1839001a49b9410