Fix uses of KeyedVector

Constructor for AudioFlinger::mAudioHwDevs was missing, and so
AudioFlinger::findSuitableHwDev_l() could return an undefined pointer
if a non-0 module wasn't found.

A KeyedVector of Plain Old Data (POD) element type must specify the
default value in the constructor, or else the default will be undefined.

Minor:
 - Parameter had wrong type in constructor for AudioSystem::gOutputs.
 - Remove obsolete AudioSystem::gStreamOutputMap.

Change-Id: I9841493e018440e559d8b8b0e4e748ba2b2d365b
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h
index 28fdfd4..36cd33a 100644
--- a/include/media/AudioSystem.h
+++ b/include/media/AudioSystem.h
@@ -318,8 +318,6 @@
 
     static sp<IAudioPolicyService> gAudioPolicyService;
 
-    // mapping between stream types and outputs
-    static DefaultKeyedVector<audio_stream_type_t, audio_io_handle_t> gStreamOutputMap;
     // list of output descriptors containing cached parameters
     // (sampling rate, framecount, channel count...)
     static DefaultKeyedVector<audio_io_handle_t, OutputDescriptor *> gOutputs;
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp
index 140fb66..193e488 100644
--- a/media/libmedia/AudioSystem.cpp
+++ b/media/libmedia/AudioSystem.cpp
@@ -37,7 +37,7 @@
 audio_error_callback AudioSystem::gAudioErrorCallback = NULL;
 // Cached values
 
-DefaultKeyedVector<audio_io_handle_t, AudioSystem::OutputDescriptor *> AudioSystem::gOutputs(0);
+DefaultKeyedVector<audio_io_handle_t, AudioSystem::OutputDescriptor *> AudioSystem::gOutputs(NULL);
 
 // Cached values for recording queries, all protected by gLock
 uint32_t AudioSystem::gPrevInSamplingRate;
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 50179c5..c1ac77b 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -159,6 +159,7 @@
 AudioFlinger::AudioFlinger()
     : BnAudioFlinger(),
       mPrimaryHardwareDev(NULL),
+      mAudioHwDevs(NULL),
       mHardwareStatus(AUDIO_HW_IDLE),
       mMasterVolume(1.0f),
       mMasterMute(false),