Bug 5126938 dependency and miscellaneous bug fixes

Fixing bug 5126938 will involve adding the IAndroidConfiguration interface
to CMediaPlayer object.  In the process of doing this, I found a few
miscellaneous bugs in the error handling for IAndroidConfiguration.  This
CL fixes those bugs, and prepares for adding the interface CMediaPlayer
by making it easier to support new objects with the interface.

Details:

 - Generic error handling:
   Move some error checks from the object-specific code into the generic
     IAndroidConfiguration.c.
   Fix bug in SetConfiguration and GetConfiguration where we were not
     checking configKey for NULL
   Return SL_RESULT_FEATURE_UNSUPPORTED instead of
      SL_RESULT_PARAMETER_INVALID if IAConfig interface is exposed on
      an object which doesn't really support it (this could if the classes.c
      interfaces table was updated before the cases were updated).
      Compare with IMuteSolo for non-AudioPlayer.

 - Object-specific error handling:
   Fix bug where we weren't returning the actual value size in
     audioPlayer_getConfig when pValueSize was non-NULL and pConfigValue
     was NULL.
   Return result SL_RESULT_BUFFER_INSUFFICIENT instead of
     SL_RESULT_PARAMETER_INVALID when output buffer is specified
     as non-NULL but available space is too small.  Compare with
     IAudioIODeviceCapabilities.
   Return result SL_RESULT_SUCCESS instead of SL_RESULT_PARAMETER_INVALID
     when output buffer is specified as NULL; this is intended to allow
     the application to discover the required space.  Compare with
     IAudioIODeviceCapabilities.

  - Use 'switch' instead of 'if' for checking object types, to improve
    readability when adding more object types

Change-Id: I8b2cdd506a36bfa9b1326a8a9966a6633bbbba6d
3 files changed
tree: 2d9dc7f7e4336d799644685747b1a39810293eec
  1. audio_effects/
  2. mca/
  3. wilhelm/
  4. CleanSpec.mk